Skip to content

Commit 17fc4b0

Browse files
ronagtargos
authored andcommitted
console: unregister temporary error listener
PR-URL: #30852 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 1811b1a commit 17fc4b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/console/constructor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function createWriteErrorHandler(instance, streamSymbol) {
201201
// removed after the event, non-console.* writes won't be affected.
202202
// we are only adding noop if there is no one else listening for 'error'
203203
if (stream.listenerCount('error') === 0) {
204-
stream.on('error', noop);
204+
stream.once('error', noop);
205205
}
206206
}
207207
};

0 commit comments

Comments
 (0)