Method: Protocol::HTTP2::Connection#ignore_frame?

Defined in:
lib/protocol/http2/connection.rb

#ignore_frame?(frame) ⇒ Boolean

6.8. GOAWAY There is an inherent race condition between an endpoint starting new streams and the remote sending a GOAWAY frame. To deal with this case, the GOAWAY contains the stream identifier of the last peer-initiated stream that was or might be processed on the sending endpoint in this connection. For instance, if the server sends a GOAWAY frame, the identified stream is the highest-numbered stream initiated by the client. Once sent, the sender will ignore frames sent on streams initiated by the receiver if the stream has an identifier higher than the included last stream identifier. Receivers of a GOAWAY frame MUST NOT open additional streams on the connection, although a new connection can be established for new streams.

Returns:

  • (Boolean)


157
158
159
160
161
162
163
164
# File 'lib/protocol/http2/connection.rb', line 157

def ignore_frame?(frame)
  if self.closed?
    # puts "ignore_frame? #{frame.stream_id} -> #{valid_remote_stream_id?(frame.stream_id)} > #{@remote_stream_id}"
    if valid_remote_stream_id?(frame.stream_id)
      return frame.stream_id > @remote_stream_id
    end
  end
end