mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
Fix bug that nghttp2_session_find_stream(session, 0) returned NULL
Previously, nghttp2_session_find_stream(session, 0) returned NULL despite the fact that documentation said that it should return root stream. Now it is corrected, and it returns root stream as documented.
This commit is contained in:
@@ -6768,6 +6768,10 @@ int32_t nghttp2_session_get_last_proc_stream_id(nghttp2_session *session) {
|
||||
|
||||
nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
|
||||
int32_t stream_id) {
|
||||
if (stream_id == 0) {
|
||||
return &session->root;
|
||||
}
|
||||
|
||||
return nghttp2_session_get_stream_raw(session, stream_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user