Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #16767 PR-URL: #16770 Fixes: #16767 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
- Loading branch information