Skip to content

Commit

Permalink
fix(cli): get rid of occasional EPIPE error printed after process exit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edvald committed Sep 28, 2021
1 parent e81a497 commit 571561c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
Expand Down

0 comments on commit 571561c

Please sign in to comment.