On Tue, 7 Feb 2023 14:22:52 GMT, Daniel Fuchs <[email protected]> wrote:

>> src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 966:
>> 
>>> 964: 
>>> 965:     void markIdle(HttpConnection c) {
>>> 966:         Boolean close = false;
>> 
>> IIRC a connection can be marked idle temporarily if we don't receive data 
>> just right after accepting the connection. New connections created in this 
>> way should probably not cause idle connections (which have finished their 
>> work) to be closed, and that's possibly what is being observed here. If it 
>> is then I'd have to agree that the fix is probably not in the right place - 
>> or that we may need to revisit how we handled 'new' connections that have 
>> never been used.
>
> Also please don't use `Boolean` but `boolean`

> New connections created in this way should probably not cause idle 
> connections (which have finished their work) to be closed, and that's 
> possibly what is being observed here.

If I'm understanding correctly, the new connection would be closed instead of 
the existing idle connection if the idle connection limit has been reached

-------------

PR: https://git.openjdk.org/jdk/pull/12413

Reply via email to