RFR: 8300268 : ServerImpl allows too many idle connections when using sun.net.httpserver.maxIdleConnections [v3]
Mark Sheppard
msheppar at openjdk.org
Wed Feb 8 12:21:48 UTC 2023
On Tue, 7 Feb 2023 15:40:48 GMT, Darragh Clarke <duke at openjdk.org> wrote:
>> Currently there is a race condition that can allow for too many 'idleConnections' in `ServerImpl`
>>
>> This PR adds a lock to make sure only one connection can be marked Idle at a time as well as a test that consistently failed before the change but which now passes.
>
> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>
> addressed comments
The IdleTimeoutTask is synchronizing on the idleConnections object, while you are using a re-entrant lock for your change, so each is using a separate independent lock for its synchronization --- shouldn't both processing blocks be co-ordinates via the same lock mechanism ?
-------------
PR: https://git.openjdk.org/jdk/pull/12413
More information about the net-dev
mailing list