mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
server not being processed While introducing yet another test to catch frame processing errors, in this case with the SETTINGS_TIMEOUT error, another loop was found. It was caused by two reasons: * connection was signaling it was "closing" on such an error, which is not really true (server already closed the stream, so no need to close it again); it should be marked as closed instead. * write buffer was still full (with the handshake in this case), so the connection was still trying to write;
20 lines
457 B
Ruby
20 lines
457 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.max_streams = 1
|
|
parser
|
|
end
|
|
end
|
|
end
|