closing socket