Skip to content

Commit

Permalink
Fix crash when using UNIX socket (mastodon#9036)
Browse files Browse the repository at this point in the history
  • Loading branch information
gomasy authored and Gargron committed Oct 21, 2018
1 parent bf58461 commit 8d70d3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
});
Expand Down

0 comments on commit 8d70d3d

Please sign in to comment.