force cleanup before destroying socket
Merge pull request #3 from fourk/master

force cleanup before destroying socket