diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 23:02:12 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 23:02:12 +0000 |
commit | 700865086123f58833f7d83033e0a1ede1d40e0f (patch) | |
tree | 62477689a8eef2699ea2c13458b26cf63c9b0c8f | |
parent | 5e1fd84bcf6524b10f02caf00de1968452d72523 (diff) |
Stop timers when shutting down
-rw-r--r-- | lib/rbot/ircbot.rb | 11 |
1 files changed, 7 insertions, 4 deletions
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 |