Handle disconnects better in runloop_once