What I'm doing is: if the EV_ERROR bit is set, close the connection right away. I'm also closing the connection if there's any error send- ing or recv-ing on a socket.

By "it works" I meant that it stoped hanging when there was an error on the socket before the send or recv.

Let me know if you think I'm doing something wrong.

But I know there is still something weird in there when using Ruby threads, I'm trying to figure it out.

thx,
m-a

On 30-May-08, at 6:51 PM, Marc Lehmann wrote:

On Fri, May 30, 2008 at 10:12:45AM -0400, Marc-André Cournoyer <[EMAIL PROTECTED] > wrote:
Perfect, it works now w/ checking the EV_ERROR bit, thx Marc!

No, it doesn't - if you get EV_ERROR for this case then your code is buggy
- you *must not* have active watchers with illegal file descriptors.

The fact that libev tries to work around your bug doesn't mean it works (in fact, you are relying on luck because this bug isn't 100% detectable
in libev).

--
The choice of a Deliantra, the free code +content MORPG
     -----==-     _GNU_              http://www.deliantra.net
     ----==-- _       generation
     ---==---(_)__  __ ____  __      Marc Lehmann
     --==---/ / _ \/ // /\ \/ /      [EMAIL PROTECTED]
     -=====/_/_//_/\_,_/ /_/\_\


_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to