Retry requests

Now we retry once when a connection is refused, instead of just failing.
Thanks to @boyska for the fix.