From db2c6fbfaf3137e0c92774a91c7638d24e084e8e Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sat, 22 Oct 2022 19:42:50 +0200 Subject: [PATCH] http2: fix debugStream method So it actually logs something when debug is activated. --- lib/internal/http2/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 456ea27cfebf79..3ca6504d934dcc 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -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,