The HttpClient SelectorManager thread may not notice immediately that the HttpClient is no longer in use if it's blocked in a select call. The select calls are all time based, so it will eventually notice, but it may take up to 1500ms before the manager wakes up.
The HttpClientFacade could use a Cleaner to wakeup the SelectorManager when it is being garbage collected. If all operations have terminated by this point (which will be the case in most regular usage of the API), the selector manager will be able t shutdown right away.
The HttpClientFacade could use a Cleaner to wakeup the SelectorManager when it is being garbage collected. If all operations have terminated by this point (which will be the case in most regular usage of the API), the selector manager will be able t shutdown right away.