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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
ronag authored and BethGriggs committed Feb 6, 2020
1 parent dc7a232 commit f54dc36
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 f54dc36

Please sign in to comment.