Skip to content

Commit

Permalink
http2: fix debugStream method
Browse files Browse the repository at this point in the history
So it actually logs something when debug is activated.

PR-URL: #45129
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
santigimeno authored and danielleadams committed Jan 3, 2023
1 parent 5d964cd commit 0b9f11b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/http2/core.js
Expand Up @@ -189,9 +189,10 @@ const { _connectionListener: httpConnectionListener } = http;
let debug = require('internal/util/debuglog').debuglog('http2', (fn) => {
debug = fn;
});
const debugEnabled = debug.enabled;

function debugStream(id, sessionType, message, ...args) {
if (!debug.enabled) {
if (!debugEnabled) {
return;
}
debug('Http2Stream %s [Http2Session %s]: ' + message,
Expand Down

0 comments on commit 0b9f11b

Please sign in to comment.