Stop the client when the server crashes.
Handle X errors to close the server and client properly.