lib/httpx/connection.rb in httpx-1.2.1 vs lib/httpx/connection.rb in httpx-1.2.2

- old
+ new

@@ -520,17 +520,18 @@ Errno::EHOSTUNREACH, Errno::EINVAL, Errno::ENETUNREACH, Errno::EPIPE, Errno::ENOENT, - SocketError => e + SocketError, + IOError => e # connect errors, exit gracefully error = ConnectionError.new(e.message) error.set_backtrace(e.backtrace) connecting? && callbacks_for?(:connect_error) ? emit(:connect_error, error) : handle_error(error) @state = :closed emit(:close) - rescue TLSError => e + rescue TLSError, HTTP2Next::Error::ProtocolError, HTTP2Next::Error::HandshakeError => e # connect errors, exit gracefully handle_error(e) connecting? && callbacks_for?(:connect_error) ? emit(:connect_error, e) : handle_error(e) @state = :closed emit(:close)