mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
replacing them with SimpleDelegator where it made sense, and removing them altogether whenever possible. ErrorResponse doesn't have a special handling for Response methods anymore, but it's highly debatable if it should.
20 lines
493 B
Ruby
20 lines
493 B
Ruby
# frozen_string_literal: true
|
|
|
|
#
|
|
# This module is used only to test transitions from a full HTTP/2 connection when it
|
|
# exhausts the number of streamss
|
|
#
|
|
module SessionWithSingleStream
|
|
module ConnectionMethods
|
|
def build_parser
|
|
parser = super
|
|
def parser.exhausted?
|
|
@connection.active_stream_count.positive?
|
|
end
|
|
parser.instance_variable_set(:@max_requests, 10)
|
|
parser.instance_variable_get(:@connection).max_streams = 1
|
|
parser
|
|
end
|
|
end
|
|
end
|