async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

Closing the client while request is in flight doesn't complete request's future.

Open akornev opened this issue 6 years ago • 1 comments

  • Kick off a request.
  • Close the client by calling AsyncHttpClient.close() before the request completes.
  • Observe that the request's future is never completed (the handler callback is never called either).

The expectation is that the client will complete the request future exceptionally (perhaps with java.nio.channels.ClosedChannelException or similar) after org.asynchttpclient.netty.channel.ChannelManager's termination future has completed.

akornev avatar Jun 07 '19 02:06 akornev

This use case is not supported atm. You’re suppose to close the client only once you’re done. AHC doesn’t have a controller which would keep track of flying requests. That’s something you’d have to implement on your side.

slandelle avatar Jun 07 '19 06:06 slandelle