In case of net.OpError (network error), retry (and fixed a bunch of
problems with the retry)