Skip to content

Commit

Permalink
http2: forward debug message in debugStreamObj
Browse files Browse the repository at this point in the history
PR-URL: #30840
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
  • Loading branch information
lundibundi authored and BethGriggs committed Feb 6, 2020
1 parent 22f8359 commit 081e488
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/http2/core.js
Expand Up @@ -153,7 +153,7 @@ function debugStream(id, sessionType, message, ...args) {
}

function debugStreamObj(stream, message, ...args) {
debugStream(stream[kID], stream[kSession][kType], ...args);
debugStream(stream[kID], stream[kSession][kType], message, ...args);
}

function debugSession(sessionType, message, ...args) {
Expand Down
4 changes: 4 additions & 0 deletions test/parallel/test-http2-debug.js
Expand Up @@ -18,6 +18,10 @@ assert(stderr.match(/Http2Session client \(\d+\) handling data frame for stream
stderr);
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting/),
stderr);
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] closed with code 0/),
stderr);
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] closed with code 0/),
stderr);
assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] tearing down stream/),
stderr);
assert.strictEqual(stdout.trim(), '');

0 comments on commit 081e488

Please sign in to comment.