From: Brian Candler Date: 2010-09-29T05:28:13+09:00 Subject: Re: TCP Socket: Connection reset, but Select says it's valid Scott Cole wrote: > Thanks for responding. I would expect to get some kind of EOF error on > an EOF condition. Instead I see something like > > error reading 'line' from # > Connection reset by peer (Errno::ECONNRESET)! Yep, it's not a simple EOF - the far end has sent a TCP RST instead of a FIN - but AFAIK the socket is marked 'readable' for select. More info at: http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2007-08/msg00176.html Note also that this is does not mean that the socket is marked selectable for 'error' - selection[2]. In fact, you're almost certainly never going to find the socket marked that way. See http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2007-11/msg00187.html -- Posted via http://www.ruby-forum.com/.