From 92a2c31c9204d228cd580692418d1f68f4de2255 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Wed, 24 Aug 2005 20:01:42 +0000 Subject: attempt fix for annoying exception issue --- lib/rbot/ircbot.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3