vertx-web icon indicating copy to clipboard operation
vertx-web copied to clipboard

HttpContext.fail() does not release the connection when invoked in SEND_REQUEST phase

Open SpikeBlues opened this issue 1 year ago • 0 comments

Version

4.5.7

Context

We have an interceptor by implementing Handler<HttpContext<T>>, in which the call to the handle() could raise an exception during the SEND_REQUESTclient phase. In such case, the interceptor shall fail the request via HttpContext.fail().

However, when multiple requests (more than 6) fail at the above point, the interceptor call will stuck at the CREATE_REQUEST after a few failed requests (usually 5 with my local test environment) and seemingly occupy the underlying connections indefinitely.

Do you have a reproducer?

Link to github project/gist

Steps to reproduce

See readme in the reproducer

Extra

------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          21 (Eclipse Adoptium 21+35-LTS)
OS:           Mac OS X 13.4.1 aarch64

SpikeBlues avatar Apr 09 '24 12:04 SpikeBlues