Loading lib/httpx/connection/http2.rb +7 −3 Changes for lib/httpx/connection/http2.rb: 7 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -25,14 +25,18 @@ module HTTPX class GoawayError < Error UNRECOVERABLE_ERRORS = %i[settings_timeout inadequate_security].freeze attr_reader :last_stream_id def initialize(code, last_stream_id) @code = code @last_stream_id = last_stream_id super(0, code) end def last_stream_id return Float::INFINITY if unrecoverable? @last_stream_id end def unrecoverable? UNRECOVERABLE_ERRORS.include?(@code) end Loading Loading @@ -165,7 +169,7 @@ module HTTPX end def handle_error(ex, request = nil) last_stream_id = 0 last_stream_id = Float::INFINITY case ex when OperationTimeoutError if !@handshake_completed && @connection.state != :closed Loading sig/connection/http2.rbs +2 −2 Changes for sig/connection/http2.rbs: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -118,12 +118,12 @@ module HTTPX class GoawayError < Error UNRECOVERABLE_ERRORS: Array[Symbol] attr_reader last_stream_id: Integer @code: Symbol def initialize: (Symbol code, Integer last_stream_id) -> void def last_stream_id: () -> Numeric def unrecoverable?: () -> bool end Loading Loading
lib/httpx/connection/http2.rb +7 −3 Changes for lib/httpx/connection/http2.rb: 7 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -25,14 +25,18 @@ module HTTPX class GoawayError < Error UNRECOVERABLE_ERRORS = %i[settings_timeout inadequate_security].freeze attr_reader :last_stream_id def initialize(code, last_stream_id) @code = code @last_stream_id = last_stream_id super(0, code) end def last_stream_id return Float::INFINITY if unrecoverable? @last_stream_id end def unrecoverable? UNRECOVERABLE_ERRORS.include?(@code) end Loading Loading @@ -165,7 +169,7 @@ module HTTPX end def handle_error(ex, request = nil) last_stream_id = 0 last_stream_id = Float::INFINITY case ex when OperationTimeoutError if !@handshake_completed && @connection.state != :closed Loading
sig/connection/http2.rbs +2 −2 Changes for sig/connection/http2.rbs: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -118,12 +118,12 @@ module HTTPX class GoawayError < Error UNRECOVERABLE_ERRORS: Array[Symbol] attr_reader last_stream_id: Integer @code: Symbol def initialize: (Symbol code, Integer last_stream_id) -> void def last_stream_id: () -> Numeric def unrecoverable?: () -> bool end Loading