Commit Graph

2 Commits

Author SHA1 Message Date
Tobias Nießen
4d8674b50f
test: fix multiple incorrect mustNotCall() uses
This does not fix occurrences in test/parallel/test-dns-* because those
tests contain unrelated pre-existing bugs that would cause the tests to
fail with this fix. This unrelated bug in those tests should be fixed
separately before the use of mustNotCall() can be fixed in those files.

PR-URL: https://github.com/nodejs/node/pull/44022
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-08-30 20:31:11 +00:00
Matteo Collina
d82bedcb7b console: avoid adding infinite error listeners
If the console destination is a unix pipe (net.Socket), write() is
async. If the destination is broken, we are adding an 'error' event
listener to avoid a process crash. This PR makes sure that we are adding
that listener only once.

Fixes: https://github.com/nodejs/node/issues/16767

PR-URL: https://github.com/nodejs/node/pull/16770
Fixes: https://github.com/nodejs/node/issues/16767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-11-08 11:22:44 +00:00