Patching up a crash on connection failure