consul-api
consul-api copied to clipboard
DefaultHttpTransport should close its inner HttpClient
The DefaultHttpTransport creates a HttpClient which is closeable
https://github.com/Ecwid/consul-api/blob/d68de32084bead34fbde29b0cf7494f2b4c206aa/src/main/java/com/ecwid/consul/transport/DefaultHttpTransport.java#L28-L33
It should be closed.
Hi,
I agree with you that, in theory, we should allow users to close internal HttpClient (just as any other Closeable
resource). However, in most applications ConsulClient (and DefaultHttpTransport) is working all time application exists.
Could you please explain the practical reasons to close inner HttpClient?