make sure we close the socket