From 571561cb9c74b8840a23bbf6159f0cdcf457ea51 Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Sun, 26 Sep 2021 17:06:23 -0400 Subject: [PATCH] fix(cli): get rid of occasional EPIPE error printed after process exit I _think_ this will do it, at least I can't seem to reproduce with the fix in place. Maybe give it a spin during review to be sure. --- core/src/proxy.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/proxy.ts b/core/src/proxy.ts index d4353deaf9..cd11a0fbef 100644 --- a/core/src/proxy.ts +++ b/core/src/proxy.ts @@ -290,6 +290,9 @@ function stopPortProxy(proxy: PortProxy, log?: LogEntry) { delete activeProxies[proxy.key] try { + // Avoid EPIPE errors + proxy.server.on("error", () => {}) + proxy.server.close() } catch {} }