Skip to content

Commit 6b1647b

Browse files
hgqxjjhanguanqiang
authored andcommitted
http2: fix an error in an if condition in 1b693fa
According to the description above, this should be checking whether frame->hd.type is NGHTTP2_GOAWAY, and the value of NGHTTP2_GOAWAY is 0x07. However, it is written as 0x03 here, which I think it is an error.
1 parent 186bbf7 commit 6b1647b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_http2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ int Http2Session::OnFrameNotSent(nghttp2_session* handle,
12061206
// closed but the Http2Session will still be up causing a memory leak.
12071207
// Therefore, if the GOAWAY frame couldn't be send due to
12081208
// ERR_SESSION_CLOSING we should force close from our side.
1209-
if (frame->hd.type != 0x03) {
1209+
if (frame->hd.type != NGHTTP2_GOAWAY) {
12101210
return 0;
12111211
}
12121212
}

0 commit comments

Comments
 (0)