diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-28 17:19:59 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-28 17:19:59 +0000 |
commit | 3679815abe399b1357b5ad9196743e8f447f80a1 (patch) | |
tree | 77067b9f5d9ccb57d47d29be74d09e509973eccd /lib/rbot | |
parent | 6ad81c62702028559f2ccc2851842c871a2c79c4 (diff) |
fix ping/pong/reconnect issue reported in #20
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircbot.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 1374929d..d16b0583 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -355,6 +355,7 @@ class IrcBot end puts "disconnected" + @last_ping = nil @channels.clear @socket.clearq @@ -568,6 +569,7 @@ class IrcBot # we'll ping the server every 30 seconds or so, and expect a response # before the next one come around.. def start_server_pings + @last_ping = nil # stop existing timers if running unless @ping_timer.nil? @timer.remove @ping_timer @@ -593,6 +595,7 @@ class IrcBot rescue debug "couldn't shutdown connection (already shutdown?)" end + @last_ping = nil end end } |