Fixed a bug when destroying a socket.
0.12.9