james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: Long-standing ServerConnection bug
Date Sat, 04 Nov 2006 15:56:08 GMT
What do you propose?

To check the limit in addClientConnectionRunner to stop the thread if 
the limit has been reached and to restart the listening thread in 
removeClientConnectionRunner if we are stopped?


Noel J. Bergman wrote:
> This is one of those bugs that has been around for so long that everyone
> just looks at it and thinks that it is working properly ... :-)
> In ServerConnection, we call serverSocket.accept(), and *then* process
> whether or not we have hit the configured limit for accepted sockets.
> Doesn't this defeat the purpose for having a TCP/IP backlog?  AFAICS, yes,
> it defeats the purpose for the queue and wastes considerable CPU cycles
> doing so.  Shouldn't we invoke accept() only if we are not already at the
> threshold (as simple as limiting the number of accept() calls to the
> configured limit)?
> 	--- Noel
> cc: Peter, who worked on the current code, to get his thoughts, too.

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message