Ensure socket is cleaned up on error.
Merge pull request #81 from krakenjs/destroy

Ensure socket is cleaned up on error.