Kill PortForwardingApp on exit
Summary: I noticed we were not killing the PortForwardingApp on exit. This is not ideal. So, use an exit hook to kill the app. Reviewed By: passy Differential Revision: D46392855 fbshipit-source-id: e2b75f76c9dfab0ff46df3ad2c94a1a523154b2a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c01b6b9f16
commit
828d56f617
@@ -23,6 +23,7 @@ import {
|
|||||||
import {FlipperServerImpl} from '../../FlipperServerImpl';
|
import {FlipperServerImpl} from '../../FlipperServerImpl';
|
||||||
import {getFlipperServerConfig} from '../../FlipperServerConfig';
|
import {getFlipperServerConfig} from '../../FlipperServerConfig';
|
||||||
import iOSCertificateProvider from './iOSCertificateProvider';
|
import iOSCertificateProvider from './iOSCertificateProvider';
|
||||||
|
import exitHook from 'exit-hook';
|
||||||
|
|
||||||
export class IOSDeviceManager {
|
export class IOSDeviceManager {
|
||||||
private portForwarders: Array<ChildProcess> = [];
|
private portForwarders: Array<ChildProcess> = [];
|
||||||
@@ -73,6 +74,11 @@ export class IOSDeviceManager {
|
|||||||
console.log(`[conn] Port forwarding app exited gracefully`);
|
console.log(`[conn] Port forwarding app exited gracefully`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exitHook(() => {
|
||||||
|
child.kill('SIGKILL');
|
||||||
|
});
|
||||||
|
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user