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 targos committed Jan 14, 2020
1 parent 1811b1a commit 17fc4b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,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 17fc4b0

Please sign in to comment.