RFR: 8304065: HttpServer.stop should terminate immediately if no exchanges are in progress [v5]

Daniel Fuchs dfuchs at openjdk.org
Tue May 27 14:20:57 UTC 2025


On Tue, 27 May 2025 13:25:38 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:

>> HttpServer::stop will terminate the server immidiately after all exhcnages are complete.
>> If the exchanges take longer then the specified delay it will terminate straight after the delay, the same as the previous behaviour.
>> 
>> Used to wait until the delay is complete at all times, regardless of the number of active exchanges.
>> 
>> Tests based on @eirbjo work, so adding Eirik as a contributor.
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   consolidated events

src/jdk.httpserver/share/classes/sun/net/httpserver/UndefLengthOutputStream.java line 78:

> 76:             } catch (IOException e) {}
> 77:         }
> 78:         Event.WriteFinished e = new Event.WriteFinished(t);

Suggestion:

        Event e = new Event.WriteFinished(t);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25333#discussion_r2109332998


More information about the net-dev mailing list