diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-24 20:01:42 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-24 20:01:42 +0000 |
commit | 92a2c31c9204d228cd580692418d1f68f4de2255 (patch) | |
tree | 00001d490796fbb804af65efcc57b823ac8f1631 /lib/rbot | |
parent | e92949d699eb5cacde8abbd1dddbefcb1d0d3a4a (diff) |
attempt fix for annoying exception issue
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircbot.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index c30d0e6d..d59d7cd3 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -325,7 +325,11 @@ class IrcBot @client.process reply end end - rescue TimeoutError, SocketError => e + # I despair of this. Some of my users get "connection reset by peer" + # exceptions that ARENT SocketError's. How am I supposed to handle + # that? + #rescue TimeoutError, SocketError => e + rescue Exception => e puts "network exception: connection closed: #{e}" puts e.backtrace.join("\n") @socket.close # now we reconnect |