From: Giuseppe Bilotta Date: Mon, 30 Apr 2012 19:50:02 +0000 (+0200) Subject: db adaptors: nil internal variable when closing X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=440ef790a60a73e9b47050cddacddba59c61b30b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git db adaptors: nil internal variable when closing This prevents subsequent spurious flushes from bombing out because of closed databases. --- diff --git a/lib/rbot/registry/bdb.rb b/lib/rbot/registry/bdb.rb index 2403ec0e..b865770f 100644 --- a/lib/rbot/registry/bdb.rb +++ b/lib/rbot/registry/bdb.rb @@ -377,6 +377,7 @@ class Bot # debug "closing registry #{registry}" return if !@registry registry.close + @registry = nil end # convert value to string form for storing in the registry diff --git a/lib/rbot/registry/tc.rb b/lib/rbot/registry/tc.rb index 8ffd3e40..06013f8f 100644 --- a/lib/rbot/registry/tc.rb +++ b/lib/rbot/registry/tc.rb @@ -376,6 +376,7 @@ class Bot # debug "closing registry #{registry}" return if !@registry registry.close + @registry = nil end # convert value to string form for storing in the registry