Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0783663 commit 1f4f811Copy full SHA for 1f4f811
lib/internal/http2/core.js
@@ -190,10 +190,10 @@ let debug = require('internal/util/debuglog').debuglog('http2', (fn) => {
190
debug = fn;
191
});
192
193
-// TODO(addaleax): See if this can be made more efficient by figuring out
194
-// whether debugging is enabled before we perform any further steps. Currently,
195
-// this seems pretty fast, though.
196
function debugStream(id, sessionType, message, ...args) {
+ if (!debug.enabled) {
+ return;
+ }
197
debug('Http2Stream %s [Http2Session %s]: ' + message,
198
id, sessionName(sessionType), ...new SafeArrayIterator(args));
199
}
0 commit comments