RFR: 8368695: Support 101 switching protocol in jdk.httpserver [v5]

Daniel Fuchs dfuchs at openjdk.org
Wed Feb 11 20:11:53 UTC 2026


On Wed, 11 Feb 2026 18:49:23 GMT, Josiah Noel <duke at openjdk.org> wrote:

> When the exchange/outstream is closed on an upgraded request, we send a WriteFinished Event to close and remove the Connection
> 

Typically the WriteFinished event will cause the connection to be returned to the pool.  Hence my question.

 > > What if there is a request timeout on the server side? Does it apply to upgraded connections? Are they still in the REQUEST state?
>
> I'm not sure I understand the question

There are timeouts that can be configured and that will cause the connection to be closed if the exchange takes too long:

https://github.com/openjdk/jdk/blob/39a1d1c801a9cbf8d21051a9af7f6279873ae260/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java#L1105C1-L1144C1

https://github.com/openjdk/jdk/blob/39a1d1c801a9cbf8d21051a9af7f6279873ae260/src/jdk.httpserver/share/classes/module-info.java#L85C1-L99C74

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27989#discussion_r2795263918


More information about the net-dev mailing list