Close activesock internally when error detected so the socket gets removed from IO queue immediately
Attempt to fix whitespace issues for merge diff
Merge pull request #5 from Metaswitch/issue174

[Reviewer] Fix to Sprout issue174