gerrit: Fix reconnection when the connection goes away.