lib/httpx/io/tcp.rb in httpx-0.18.6 vs lib/httpx/io/tcp.rb in httpx-0.18.7
- old
+ new
@@ -55,10 +55,12 @@
if @io.closed?
transition(:idle)
@io = build_socket
end
try_connect
- rescue Errno::EHOSTUNREACH => e
+ rescue Errno::ECONNREFUSED,
+ Errno::EADDRNOTAVAIL,
+ Errno::EHOSTUNREACH => e
raise e if @ip_index <= 0
@ip_index -= 1
retry
rescue Errno::ETIMEDOUT => e