change to zero exit if target app disconnects

Summary: Per yesterdays review, consider target app exiting as  a signal to end the dump process.

Reviewed By: passy

Differential Revision: D31609065

fbshipit-source-id: fbd92f6c5344245d0bdae3f21be1a5d235aa1fa1
This commit is contained in:
Michel Weststrate
2021-10-14 03:16:38 -07:00
committed by Facebook GitHub Bot
parent a51c8caa09
commit d4eb618cdd

View File

@@ -169,7 +169,9 @@ async function start(deviceTitle: string, appName: string, pluginId: string) {
server.on('client-disconnected', ({id}) => { server.on('client-disconnected', ({id}) => {
if (id === client?.id) { if (id === client?.id) {
reject(new Error('Application disconnected')); // TODO: maybe we need a flag to signal that this might be undesired?
logger.info('Target application disconnected, exiting...');
process.exit(0);
} }
}); });