Commit eb8b97c2 authored by zhujiashun's avatar zhujiashun

Remove _goaway_sent

parent f1a33346
......@@ -328,7 +328,6 @@ H2Context::H2Context(Socket* socket, const Server* server)
, _last_received_stream_id(-1)
, _last_sent_stream_id(1)
, _goaway_stream_id(-1)
, _goaway_sent(false)
, _deferred_window_update(0) {
// Stop printing the field which is useless for remote settings.
_remote_settings.connection_window_size = 0;
......@@ -532,7 +531,6 @@ ParseResult H2Context::Consume(
LOG(WARNING) << "Fail to send GOAWAY to " << *_socket;
return MakeParseError(PARSE_ERROR_ABSOLUTELY_WRONG);
}
_goaway_sent = true;
return MakeMessage(NULL);
}
} else {
......@@ -549,12 +547,6 @@ H2ParseResult H2Context::OnHeaders(
LOG(ERROR) << "Invalid stream_id=" << frame_head.stream_id;
return MakeH2Error(H2_PROTOCOL_ERROR);
}
if (_goaway_sent) {
// TODO(zhujiashun): After sending a GOAWAY frame, the sender can discard
// frames for streams initiated by the receiver with identifiers higher
// than the identified last stream.
// Do we really need this strict check?
}
const bool has_padding = (frame_head.flags & H2_FLAGS_PADDED);
const bool has_priority = (frame_head.flags & H2_FLAGS_PRIORITY);
if (frame_head.payload_size <
......
......@@ -383,7 +383,6 @@ friend void InitFrameHandlers();
int _last_received_stream_id;
uint32_t _last_sent_stream_id;
int _goaway_stream_id;
bool _goaway_sent;
H2Settings _remote_settings;
H2Settings _local_settings;
H2Settings _unack_local_settings;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment