[fix] Remove the event listeners attached to the socket when it gets closed
Merge pull request #231 from lpinca/remove/event-listeners

Remove the event listeners attached to the socket when it gets closed