Added a hook to shutdown the underlying http client library in case of lingering connections.