Harden disconnection handling.