bugfix issue #113: callback called multiple times with error

response listener was called twice when the socket is already closed
and the state is not connected.

revert changes in commit 23832df015787f95933fae5672f847dc23057791