Fix double firing of close event when explicitly closing a socket
Merge pull request #284 from rase-/fix/tests

Fix double firing of close event when explicitly closing a socket