-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to close connection #2579
Comments
The purpose of the web-client pool is to:
I'm not sure closing connections is compatible with these goals, in particular the second one. If it's more important in your project's context to minimize resources used, why not handling connections manually? |
If you configure your The problem is that there is no way to cascade this timeout to other downstream services, e.g.: |
I see. In fact, Vert.x will invoke reset on the The created And then of course we need to understand why the Do you remember the rationale behind this @vietj ? |
Describe the feature
Vert.x 4
It should be possible to close the underlying connection during http calls
Use cases
When you e.g. use the reactive wrapper, or wrap it yourself, it would be nice to be able to close the connection if your reactive pipeline is being disposed.
Since the connection is hidden inside a
HttpClientRequest
inside theHttpContext
this is easier said than done.As I see it, two things needs to happen to make this possible;
HttpContext
through theHttpRequest
HttpClientRequest
as soon as the connection has been made (the Java doc forHttpContext.clientRequest
states: "Returns: the underlying client request, only available during ClientPhase.SEND_REQUEST and after", which is obviously not trueMy experiment to try this out looks something like this:
Contribution
To me this sounds fairly easy to implement, but I'm not sure of the implications of not nulling out the clientRequest (and also what that would mean from pooling aspects etc). If the test coverage is good, I could help out with this...
The text was updated successfully, but these errors were encountered: