Clean up the socket server.