From af48120b6290778e578ff1a3e4254680e35d2e05 Mon Sep 17 00:00:00 2001 From: Gomasy Date: Sun, 21 Oct 2018 23:41:33 +0900 Subject: [PATCH] Fix crash when using UNIX socket (#9036) --- streaming/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/streaming/index.js b/streaming/index.js index dd1a8d5462..b4d09d0ad2 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -642,9 +642,8 @@ const startWorker = (workerId) => { const attachServerWithConfig = (server, onSuccess) => { if (process.env.SOCKET || process.env.PORT && isNaN(+process.env.PORT)) { server.listen(process.env.SOCKET || process.env.PORT, () => { - fs.chmodSync(server.address(), 0o666); - if (onSuccess) { + fs.chmodSync(server.address(), 0o666); onSuccess(server.address()); } });