lib/httpx/io/tcp.rb in httpx-1.2.1 vs lib/httpx/io/tcp.rb in httpx-1.2.2

- old
+ new

@@ -76,10 +76,11 @@ end try_connect rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Errno::EHOSTUNREACH, - SocketError => e + SocketError, + IOError => e raise e if @ip_index <= 0 log { "failed connecting to #{@ip} (#{e.message}), trying next..." } @ip_index -= 1 @io = build_socket