Fix crash on reconnect failure.