more graceful shutdown, wait for all connections to close