retry connections three times before failing

I like the way this looks much better.