From 363bf0f09457b87f6766937c6cc4657a91f2c423 Mon Sep 17 00:00:00 2001 From: fatme Date: Wed, 17 Jul 2019 09:52:17 +0300 Subject: [PATCH 1/2] fix: stop livesync on initial sync when there is an error --- lib/controllers/run-controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/controllers/run-controller.ts b/lib/controllers/run-controller.ts index 259a44b99f..8eb5a28a9c 100644 --- a/lib/controllers/run-controller.ts +++ b/lib/controllers/run-controller.ts @@ -330,6 +330,8 @@ export class RunController extends EventEmitter implements IRunController { applicationIdentifier: projectData.projectIdentifiers[device.deviceInfo.platform.toLowerCase()], error: err, }); + + await this.stop({ projectDir: projectData.projectDir, deviceIdentifiers: [device.deviceInfo.identifier] }); } }; From 14fb58bd8fa2690656856e949d0d1fc5c60562e1 Mon Sep 17 00:00:00 2001 From: fatme Date: Wed, 17 Jul 2019 17:59:16 +0300 Subject: [PATCH 2/2] fix: don't hangs livesync process when there is an error on initial sync or on change --- lib/controllers/run-controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controllers/run-controller.ts b/lib/controllers/run-controller.ts index 8eb5a28a9c..3c801c24dd 100644 --- a/lib/controllers/run-controller.ts +++ b/lib/controllers/run-controller.ts @@ -331,7 +331,7 @@ export class RunController extends EventEmitter implements IRunController { error: err, }); - await this.stop({ projectDir: projectData.projectDir, deviceIdentifiers: [device.deviceInfo.identifier] }); + await this.stop({ projectDir: projectData.projectDir, deviceIdentifiers: [device.deviceInfo.identifier], stopOptions: { shouldAwaitAllActions: false }}); } }; @@ -410,7 +410,7 @@ export class RunController extends EventEmitter implements IRunController { error: err, }); - await this.stop({ projectDir: projectData.projectDir, deviceIdentifiers: [device.deviceInfo.identifier] }); + await this.stop({ projectDir: projectData.projectDir, deviceIdentifiers: [device.deviceInfo.identifier], stopOptions: { shouldAwaitAllActions: false } }); } };