Adding client exiting if server is shutting down