Close event connections when the server is gracefully shutting down.