File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -612,13 +612,23 @@ def connection_for uri
612612
613613 return yield connection
614614 rescue Errno ::ECONNREFUSED
615- address = http . proxy_address || http . address
616- port = http . proxy_port || http . port
615+ if http . proxy?
616+ address = http . proxy_address
617+ port = http . proxy_port
618+ else
619+ address = http . address
620+ port = http . port
621+ end
617622
618623 raise Error , "connection refused: #{ address } :#{ port } "
619624 rescue Errno ::EHOSTDOWN
620- address = http . proxy_address || http . address
621- port = http . proxy_port || http . port
625+ if http . proxy?
626+ address = http . proxy_address
627+ port = http . proxy_port
628+ else
629+ address = http . address
630+ port = http . port
631+ end
622632
623633 raise Error , "host down: #{ address } :#{ port } "
624634 ensure
Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ def proxy_address
116116 end
117117 def proxy_port
118118 end
119+ def proxy?
120+ false
121+ end
119122 end
120123
121124 def basic_connection
You can’t perform that action at this time.
0 commit comments