There are simple leaks and one more complex.
The complex one comes from the fact fact HConnectionManager.HConnectionImplementation keeps a reference to the configuration used for the creation. So if this configuration is updated later, the HConnectionKey created initially will differ from the current one. As a consequence, the close() will not find the connection anymore in the list, and the connection won't be deleted.
I added a warning when a close does not find the connection in the list; but I wonder if we should not copy the HConnectionKey instead of keeping a reference.