Wait until the client is disconnected to send events.