httpx/test/support/session_with_frame_delay.rb
HoneyryderChuck 035eda1f95 fixed another loop caused by certain connection goaway frames from
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;
2020-11-27 13:47:36 +00:00

15 lines
305 B
Ruby

# frozen_string_literal: true
#
# This module is used only to test frame errors for HTTP/2. It targets the settings timeout of
# nghttp2.org, which is known as being 10 seconnds.
#
module SessionWithFrameDelay
module ConnectionMethods
def send_pending
sleep(11)
super
end
end
end