If there's a websocket being waited on the shut down won't actually happen. Add a new event for shut down and send it to break the websocket out of its loop.