Browse Source

Fix crash when using UNIX socket (#9036)

Gomasy 1 month ago
parent
commit
8d70d3de38
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      streaming/index.js

+ 1
- 2
streaming/index.js View File

@@ -642,9 +642,8 @@ const startWorker = (workerId) => {
642 642
 const attachServerWithConfig = (server, onSuccess) => {
643 643
   if (process.env.SOCKET || process.env.PORT && isNaN(+process.env.PORT)) {
644 644
     server.listen(process.env.SOCKET || process.env.PORT, () => {
645
-      fs.chmodSync(server.address(), 0o666);
646
-
647 645
       if (onSuccess) {
646
+        fs.chmodSync(server.address(), 0o666);
648 647
         onSuccess(server.address());
649 648
       }
650 649
     });