fix retry middleware which didn't retry certain connection errors after the upgrade to http1 client, closes GH-373