Close the socket