close the server after shutdown (and close the socket)