summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-03-01 17:10:20 -0300
committerEuAndreh <eu@euandre.org>2024-03-01 17:10:20 -0300
commit8680e1c3ef7b8884052504fd68aca197389ae13c (patch)
tree647ff9dc3972d0605372538ce46dc6ed43cdf94c
parentsrc/hero.mjs: Add app name as first argument to buildServer() (diff)
downloadpapod-8680e1c3ef7b8884052504fd68aca197389ae13c.tar.gz
papod-8680e1c3ef7b8884052504fd68aca197389ae13c.tar.xz
src/hero.mjs: Always recreate the unix socket file
-rw-r--r--src/hero.mjs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hero.mjs b/src/hero.mjs
index 37f4ad2..fcbdc17 100644
--- a/src/hero.mjs
+++ b/src/hero.mjs
@@ -345,6 +345,9 @@ export const promisifyServer = (name, serverHandle) => ({
ref: serverHandle,
listen: util.promisify((udsPath, ...args) => {
configLogger({ name });
+ if (fs.existsSync(udsPath)) {
+ fs.unlinkSync(udsPath);
+ }
return serverHandle.listen(udsPath, ...args)
}),
close: util.promisify((...args) => serverHandle.close(...args)),