Loading lib/httpx/connection.rb +9 −5 Original line number Diff line number Diff line Loading @@ -390,6 +390,14 @@ module HTTPX current_session.deselect_connection(self, current_selector, @cloned) end def on_connect_error(e) # connect errors, exit gracefully error = ConnectionError.new(e.message) error.set_backtrace(e.backtrace) handle_connect_error(error) if connecting? force_close end def on_io_error(e) on_error(e) force_close(true) Loading Loading @@ -707,11 +715,7 @@ module HTTPX Errno::ENOENT, SocketError, IOError => e # connect errors, exit gracefully error = ConnectionError.new(e.message) error.set_backtrace(e.backtrace) handle_connect_error(error) if connecting? force_close on_connect_error(e) rescue TLSError, ::HTTP2::Error::ProtocolError, ::HTTP2::Error::HandshakeError => e # connect errors, exit gracefully handle_error(e) Loading sig/connection.rbs +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,8 @@ module HTTPX def on_io_error: (IOError error) -> void def on_connect_error: (Exception error) -> void private def initialize: (http_uri uri, Options options) -> void Loading Loading
lib/httpx/connection.rb +9 −5 Original line number Diff line number Diff line Loading @@ -390,6 +390,14 @@ module HTTPX current_session.deselect_connection(self, current_selector, @cloned) end def on_connect_error(e) # connect errors, exit gracefully error = ConnectionError.new(e.message) error.set_backtrace(e.backtrace) handle_connect_error(error) if connecting? force_close end def on_io_error(e) on_error(e) force_close(true) Loading Loading @@ -707,11 +715,7 @@ module HTTPX Errno::ENOENT, SocketError, IOError => e # connect errors, exit gracefully error = ConnectionError.new(e.message) error.set_backtrace(e.backtrace) handle_connect_error(error) if connecting? force_close on_connect_error(e) rescue TLSError, ::HTTP2::Error::ProtocolError, ::HTTP2::Error::HandshakeError => e # connect errors, exit gracefully handle_error(e) Loading
sig/connection.rbs +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,8 @@ module HTTPX def on_io_error: (IOError error) -> void def on_connect_error: (Exception error) -> void private def initialize: (http_uri uri, Options options) -> void Loading