From d4eb618cdd75e1bd4594c1127b16005384f6a62f Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 14 Oct 2021 03:16:38 -0700 Subject: [PATCH] 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 --- desktop/flipper-dump/src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-dump/src/index.tsx b/desktop/flipper-dump/src/index.tsx index 06cb41135..f51a5f69e 100644 --- a/desktop/flipper-dump/src/index.tsx +++ b/desktop/flipper-dump/src/index.tsx @@ -169,7 +169,9 @@ async function start(deviceTitle: string, appName: string, pluginId: string) { server.on('client-disconnected', ({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); } });