users@glassfish.java.net

Re: File Descriptor Leak

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 Nov 2008 06:43:29 PST

Did you add a timeout to your sockets?

If the remote end of a socket *silently* disconnects, your local socket will block indefinitely on a read(...) - a write(...) however will throw an IOException and force the read(...) out of blocking.

So to prevent these runaway sockets, add a timeout.
[Message sent by forum member 'riven' (riven)]

http://forums.java.net/jive/thread.jspa?messageID=315008