]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
db adaptors: nil internal variable when closing
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 30 Apr 2012 19:50:02 +0000 (21:50 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 30 Apr 2012 19:50:02 +0000 (21:50 +0200)
This prevents subsequent spurious flushes from bombing out because of
closed databases.

lib/rbot/registry/bdb.rb
lib/rbot/registry/tc.rb

index 2403ec0e6359074af2acd60b186a08509574918f..b865770fc32ff740d2c88eb816e76e30175f39c8 100644 (file)
@@ -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
index 8ffd3e40f0a7e76dc8511c24d74b515813cc4695..06013f8f796749aa2f2e751a1a179c6208218393 100644 (file)
@@ -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