Better disconnect handling on the client.