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

Daniel Fuchs dfuchs at openjdk.org
Wed Feb 11 19:48:36 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.

Daniel Fuchs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:

 - Merge branch 'master' into stop-after-throws-8377302
 - Add more comments to ExchangeImpl
 - Update test/jdk/com/sun/net/httpserver/FailAndStopTest.java
   
   Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
 - 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:
  - all: https://git.openjdk.org/jdk/pull/29606/files
  - new: https://git.openjdk.org/jdk/pull/29606/files/f52edc11..29b1679f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29606&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29606&range=02-03

  Stats: 6859 lines in 226 files changed: 3988 ins; 1774 del; 1097 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