Proper way to close reactor netty HttpClient

95 views Asked by At

Reactor netty HttpClient does not have a method to close or shutdown the handle. What is the correct way of releasing resources of HttpClient?

As per document When I create a HttpClient using HttpClient client = HttpClient.create(); this will internally create a default connection pool. How can I make sure that connection pool is released properly?

1

There are 1 answers

2
Violeta Georgieva On BEST ANSWER

If the connection pool is not used by other HttpClients, you can dispose it with invoking client.configuration().connectionProvider().dispose()/disposeLater()