diff options
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 |