summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 09:33:38 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 09:33:38 +0900
commitd0fc644dc2688f48213411738d7b6935526fc730 (patch)
tree28733ac404e4c64cdb2fe2505e119bbb0eea4b97 /src
parent[WIP] test (diff)
downloadsharkey-d0fc644dc2688f48213411738d7b6935526fc730.tar.gz
sharkey-d0fc644dc2688f48213411738d7b6935526fc730.tar.bz2
sharkey-d0fc644dc2688f48213411738d7b6935526fc730.zip
[Server] Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/server.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.ts b/src/server.ts
index 63a9b18b6b..5f00fd2813 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -5,6 +5,7 @@
import * as fs from 'fs';
import * as http from 'http';
import * as https from 'https';
+import * as cluster from 'cluster';
import * as express from 'express';
import vhost = require('vhost');
@@ -53,8 +54,10 @@ require('./api/streaming')(server);
* Server listen
*/
server.listen(config.port, () => {
- // Send a 'ready' message to parent process
- process.send('ready');
+ if (cluster.isWorker) {
+ // Send a 'ready' message to parent process
+ process.send('ready');
+ }
});
/**