Dont kill flipper server when no clients connect and is dev
Summary: This is quite annoying and causes may un needed reboots of flipper server while developing Reviewed By: antonk52 Differential Revision: D47949842 fbshipit-source-id: c2f18e16a4933e4209e74f51978cb7d05b80ee11
This commit is contained in:
committed by
Facebook GitHub Bot
parent
09042ec5d6
commit
eaf5b4c246
@@ -17,6 +17,7 @@ import {
|
||||
SystemError,
|
||||
getLogger,
|
||||
CompanionEventWebSocketMessage,
|
||||
isProduction,
|
||||
} from 'flipper-common';
|
||||
import {FlipperServerImpl} from '../FlipperServerImpl';
|
||||
import {RawData, WebSocketServer} from 'ws';
|
||||
@@ -242,7 +243,7 @@ export function attachSocketServer(
|
||||
* If, after 15 min, there are no more connected clients, we exit the process.
|
||||
*/
|
||||
disconnectTimeout = setTimeout(() => {
|
||||
if (numberOfConnectedClients === 0) {
|
||||
if (numberOfConnectedClients === 0 && isProduction()) {
|
||||
console.info('Shutdown as no clients are currently connected');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user