i have put enough exception handlers. but this prog keeps stalling
after some time. how do i fix it.

Wed Sep 24 10:30:16 -0700 2008
Wed Sep 24 10:30:22 -0700 2008
c:/ruby/lib/ruby/1.8/openssl/buffering.rb:35:in `sysread': An existing
connectio
n was forcibly closed by the remote host. (Errno::ECONNRESET)
        from c:/ruby/lib/ruby/1.8/openssl/buffering.rb:35:in
`fill_rbuff'
        from c:/ruby/lib/ruby/1.8/openssl/buffering.rb:106:in `gets'
        from c:/ruby/lib/ruby/1.8/net/imap.rb:991:in `get_response'
        from c:/ruby/lib/ruby/1.8/net/imap.rb:929:in
`receive_responses'
        from c:/ruby/lib/ruby/1.8/net/imap.rb:922:in `initialize'
        from c:/ruby/lib/ruby/1.8/net/imap.rb:921:in `start'
        from c:/ruby/lib/ruby/1.8/net/imap.rb:921:in `initialize'
        from ./imDaveAlerts.rb:13:in `new'
        from ./imDaveAlerts.rb:13:in `doAlerts'
        from C:/toronto/app/helpers/myCron.rb:10
        from c:/ruby/lib/ruby/gems/1.8/gems/timeoutx-0.3.0/lib/
timeoutx.rb:58:in
 `timeout'
        from C:/toronto/app/helpers/myCron.rb:7




require 'imDaveAlerts'
require "timeoutx"

while(true)

puts Time.now
  begin
    TimeoutX.timeout(15){
       begin
        a=DaveAlerts.new
        a.doAlerts()
        rescue Exception
        print Exception.to_s
      end
     }
  rescue Exception
        print Exception.to_s
      end
sleep(5)
end