server gracefully shuts down and so do the clients