RFR: 8377302: HttpServer::stop uses full timeout duration if handler throws

Daniel Fuchs dfuchs at openjdk.org
Mon Feb 9 21:26:45 UTC 2026


When a HttpHandler::handle method throws an unexpected exception, the HttpServer rightfully closes the associated connection. However, the exchange is still discounted as pending, which causes HttpServer::stop to wait for the full timeout duration, even though all connections have been closed.

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

Commit messages:
 - Review feedback
 - Merge branch 'master' into stop-after-throws-8377302
 - add bug id
 - improve the test
 - 8377302: HttpServer::stop uses full timeout duration if handler throws

Changes: https://git.openjdk.org/jdk/pull/29606/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29606&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8377302
  Stats: 443 lines in 7 files changed: 363 ins; 17 del; 63 mod
  Patch: https://git.openjdk.org/jdk/pull/29606.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29606/head:pull/29606

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


More information about the net-dev mailing list