Exception: HTTPX::Connection::HTTP2::GoawayError
- Defined in:
- lib/httpx/connection/http2.rb,
sig/connection/http2.rbs
Constant Summary collapse
- UNRECOVERABLE_ERRORS =
%i[settings_timeout inadequate_security].freeze
Instance Method Summary collapse
-
#initialize(code, last_stream_id) ⇒ GoawayError
constructor
A new instance of GoawayError.
- #last_stream_id ⇒ Numeric
- #unrecoverable? ⇒ Boolean
Constructor Details
#initialize(code, last_stream_id) ⇒ GoawayError
Returns a new instance of GoawayError.
28 29 30 31 32 |
# File 'lib/httpx/connection/http2.rb', line 28 def initialize(code, last_stream_id) @code = code @last_stream_id = last_stream_id super(0, code) end |
Instance Method Details
#last_stream_id ⇒ Numeric
34 35 36 37 38 |
# File 'lib/httpx/connection/http2.rb', line 34 def last_stream_id return Float::INFINITY if unrecoverable? @last_stream_id end |
#unrecoverable? ⇒ Boolean
40 41 42 |
# File 'lib/httpx/connection/http2.rb', line 40 def unrecoverable? @last_stream_id.zero? || UNRECOVERABLE_ERRORS.include?(@code) end |