From: Wakou Aoyama Date: 2002-02-15T05:19:17+09:00 Subject: Re: catching timeout in net/telnet one short example. begin # connect, login, ... rescue Errno::ECONNREFUSED # Connection refused sleep some_time and retry # and (or) more suitable processing rescue Errno::ECONNRESET # Connection reset by peer sleep some_time and retry # and (or) more suitable processing rescue TimeoutError # timed-out sleep some_time and retry # and (or) more suitable processing rescue # ... end begin # main routine rescue Errno::ECONNRESET # Connection reset by peer # ... rescue TimeoutError # timed-out # ... rescue # ... end begin # logout, ... rescue Errno::ECONNRESET # Connection reset by peer # ... rescue TimeoutError # timed-out # ... rescue # ... end -- Wakou Aoyama