Skip to content

Commit

Permalink
console: unregister temporary error listener
Browse files Browse the repository at this point in the history
PR-URL: #30852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
ronag authored and MylesBorins committed Dec 17, 2019
1 parent 00cbf5b commit 4f3eca5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/console/constructor.js
Expand Up @@ -213,7 +213,7 @@ function createWriteErrorHandler(instance, streamSymbol) {
// removed after the event, non-console.* writes won't be affected.
// we are only adding noop if there is no one else listening for 'error'
if (stream.listenerCount('error') === 0) {
stream.on('error', noop);
stream.once('error', noop);
}
}
};
Expand Down

0 comments on commit 4f3eca5

Please sign in to comment.