On 1/23/07, Akbar Munir <[EMAIL PROTECTED]> wrote:
Thanks. It works. I believe this would also reduce the time that my connection thread would wait for the session to be established?
No, it wouldn't. It is a timeout only applied when there's no connection attempts to manage. Though I have not looked in to the code, but I was curious as to why the
timeout timer can not be killed if it has determined that the connection can not be established (as it releases the threads which have joined ConnectFuture and ConnectFuture gives indication that connection can not be established)? If that is doable, then the thread would not wait for it to time out and can release resources immediately.
When SocketConnector implmented first, the worker thread exited whenever there's no connection attempts left. It caused performance degradation when a user connects to a remote peer frequently because the worker thread can be spawned every time you attempt a connection. So we introduced the timeout. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
