explicitly close the socket