Bug fix deriving from attempting to destroy socket twice.