Fix gerrit re-connection issues