Method: Protocol::HTTP2::Connection#receive_window_update
- Defined in:
- lib/protocol/http2/connection.rb
#receive_window_update(frame) ⇒ Object
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/protocol/http2/connection.rb', line 419 def receive_window_update(frame) if frame.connection? super self.consume_window elsif stream = @streams[frame.stream_id] begin stream.receive_window_update(frame) rescue ProtocolError => error stream.send_reset_stream(error.code) end else # Receiving any frame other than HEADERS or PRIORITY on a stream in this state MUST be treated as a connection error of type PROTOCOL_ERROR. raise ProtocolError, "Cannot update window of idle stream #{frame.stream_id}" end end |