Method: Protocol::HTTP2::Connection#receive_goaway

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

#receive_goaway(frame) ⇒ Object



217
218
219
220
221
222
223
224
225
226
227
# File 'lib/protocol/http2/connection.rb', line 217

def receive_goaway(frame)
  # We capture the last stream that was processed.
  @remote_stream_id, error_code, message = frame.unpack
  
  self.close!
  
  if error_code != 0
    # Shut down immediately.
    raise GoawayError.new(message, error_code)
  end
end