Fixes leak of open connections with CLOSE_WAIT status

This should resolve issue #49