Rename last_stream_id in nghttp2_session to remote_last_stream_id
This commits also fixes last stream ID in GOAWAY uses wrong stream ID.
This commit is contained in:
parent
62900cd85b
commit
817e1ce2a7
|
@ -322,7 +322,7 @@ static int session_new(nghttp2_session **session_ptr,
|
|||
(*session_ptr)->local_window_size = NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE;
|
||||
|
||||
(*session_ptr)->goaway_flags = NGHTTP2_GOAWAY_NONE;
|
||||
(*session_ptr)->last_stream_id = 0;
|
||||
(*session_ptr)->remote_last_stream_id = 0;
|
||||
|
||||
(*session_ptr)->inflight_niv = -1;
|
||||
|
||||
|
@ -3650,7 +3650,7 @@ int nghttp2_session_on_goaway_received(nghttp2_session *session,
|
|||
return session_handle_invalid_connection(session, frame,
|
||||
NGHTTP2_PROTOCOL_ERROR);
|
||||
}
|
||||
session->last_stream_id = frame->goaway.last_stream_id;
|
||||
session->remote_last_stream_id = frame->goaway.last_stream_id;
|
||||
session->goaway_flags |= NGHTTP2_GOAWAY_RECV;
|
||||
return session_call_on_frame_received(session, frame);
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ struct nghttp2_session {
|
|||
NGHTTP2_MAX_UNIQUE_ID */
|
||||
uint32_t next_unique_id;
|
||||
/* This is the value in GOAWAY frame received from remote endpoint. */
|
||||
int32_t last_stream_id;
|
||||
int32_t remote_last_stream_id;
|
||||
/* Current sender window size. This value is computed against the
|
||||
current initial window size of remote endpoint. */
|
||||
int32_t remote_window_size;
|
||||
|
|
|
@ -249,7 +249,7 @@ int nghttp2_submit_goaway(nghttp2_session *session, uint8_t flags,
|
|||
nghttp2_error_code error_code,
|
||||
const uint8_t *opaque_data, size_t opaque_data_len)
|
||||
{
|
||||
return nghttp2_session_add_goaway(session, session->last_stream_id,
|
||||
return nghttp2_session_add_goaway(session, session->last_proc_stream_id,
|
||||
error_code, opaque_data, opaque_data_len);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue