> Please find enclosed a patch that solves an intermittent issue detected by > the CancelRequestTest.java > > If during an HTTP upgrade from HTTP/1.1 to HTTP/2, the request is cancelled > after the Http2Connection has been created, and the handshake has proceeded, > and the response headers to the upgrade have been received, but before the > HTTP/2 connection is offered to the HTTP/2 connection pool, the underlying > TCP connection might get closed at a time where it won't be noticed > immediately, resulting in putting a "dead" HTTP/2 connection in the pool. The > next request to the same server will then fail with "ClosedChannelException". > > The fix is to check the state of the underlying TCP connection before > offering the HTTP/2 connection to the pool, and when retrieving it from the > pool, and disabling the "connectionAborter" (which is there to abort the > connection in case of connect timeout, or cancellation before connect is > done) before offering the connection to the pool as well.
Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision: Copyright years ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7776/files - new: https://git.openjdk.java.net/jdk/pull/7776/files/f5b341d2..619bf54f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7776&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7776&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7776.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7776/head:pull/7776 PR: https://git.openjdk.java.net/jdk/pull/7776