closing sockets.