From 700865086123f58833f7d83033e0a1ede1d40e0f Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 12 Apr 2007 23:02:12 +0000 Subject: Stop timers when shutting down --- lib/rbot/ircbot.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 3ef58a38..e3e4517b 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -1029,7 +1029,7 @@ class Bot # disconnect from the server and cleanup all plugins and modules def shutdown(message = nil) @quit_mutex.synchronize do - debug "Shutting down ..." + debug "Shutting down:" ## No we don't restore them ... let everything run through # begin # trap("SIGINT", "DEFAULT") @@ -1038,16 +1038,19 @@ class Bot # rescue => e # debug "failed to restore signals: #{e.inspect}\nProbably running on windows?" # end + debug "\tdisconnecting..." disconnect - debug "Saving" + debug "\tsaving ..." save - debug "Cleaning up" + debug "\tcleaning up ..." @save_mutex.synchronize do @plugins.cleanup end + debug "\tstopping timers ..." + @timer.stop # debug "Closing registries" # @registry.close - debug "Cleaning up the db environment" + debug "\t\tcleaning up the db environment ..." DBTree.cleanup_env log "rbot quit (#{message})" end -- cgit v1.2.3