Skip to content

Commit 4f3eca5

Browse files
ronagMylesBorins
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 00cbf5b commit 4f3eca5

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
@@ -213,7 +213,7 @@ function createWriteErrorHandler(instance, streamSymbol) {
213213
// removed after the event, non-console.* writes won't be affected.
214214
// we are only adding noop if there is no one else listening for 'error'
215215
if (stream.listenerCount('error') === 0) {
216-
stream.on('error', noop);
216+
stream.once('error', noop);
217217
}
218218
}
219219
};

0 commit comments

Comments
 (0)