Code Review Request: 8014254: Selector in HttpServer introduces a 1000 ms delay when using KeepAlive
Matthew Hall
mhall at mhcomputing.net
Wed May 8 16:35:08 PDT 2013
On Wed, May 08, 2013 at 04:06:10PM -0700, Kurchi Hazra wrote:
> com.sun.net.httpServer uses a selector to get notified about interesting
> events (such as arrival of a new connection, or data available to read
> on an existing connection when using keep-alive), but imposes a timeout of
> 1000 ms on the select() operation.
Maybe I'm missing something since the bug is not viewable to the community,
but, if I'm reading properly, this design by itself is not quite right, and
the fix of 200 msec selector timeout is just a band-aid solution.
Shouldn't it be registering interestOps for reading on the existing
connections and accepting connections from the server socket in the selector?
Otherwise why use any selector in the first place if it's not really selecting
across all the right sockets and right events on them?
Regards,
Matthew.
More information about the net-dev
mailing list