From: Roger Pack Date: 2007-11-13T04:20:55+09:00 Subject: Re: Socket timeout If you're not worried about scaling then Timeout::timeout(30) { do stuff } or Thread.new { sleep 30 if hasnt_done_anything raise on it # scary! end } maybe :) Lee Jarvis wrote: > I am using a TCPSocket and I want the script to restart if the > connection times out. I have tried doing it myself and searched around > everywhere for a solution but I have had no luck.. Any help would be > great > > tia > > Lee -- Posted via http://www.ruby-forum.com/.