lib/httpx/io/tcp.rb in httpx-0.22.2 vs lib/httpx/io/tcp.rb in httpx-0.22.3
- old
+ new
@@ -74,14 +74,10 @@
try_connect
rescue Errno::ECONNREFUSED,
Errno::EADDRNOTAVAIL,
Errno::EHOSTUNREACH,
SocketError => e
- if @ip_index <= 0
- error = ConnectionError.new(e.message)
- error.set_backtrace(e.backtrace)
- raise error
- end
+ raise e if @ip_index <= 0
log { "failed connecting to #{@ip} (#{e.message}), trying next..." }
@ip_index -= 1
@io = build_socket
retry