Le 12/30/12 6:16 PM, Julien Vermillard a écrit :
> Yes the timeout doesn't works correctly, I commited the test for Emmanuel.
> Looks like NIO async connect doesnt handle timeout like I thought.

Yep. As NIO is non-blocking, there is no need for a timeout. That means
you can't use the SO_TIMEOUT to detect a dead connection like you did in
your test.

In other words, in order to detect that a connection hasn't received the
data you are expecting - or that the connection is dead -  you have to
use some mechanism close to what we have for idle detection (for read,
this is obviosuly what idle is expected to do, for staled connection,
it's  bit different).

Thanks for the test, Julien !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to