diff --git a/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDev.java b/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDev.java index f180cccd..bbb1726d 100644 --- a/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDev.java +++ b/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDev.java @@ -183,6 +183,7 @@ public class DoricDev { public void onClose() { devKitConnected = false; + stopDebugging(true); uiHandler.post(new Runnable() { @Override public void run() { @@ -195,6 +196,7 @@ public class DoricDev { public void onFailure(final Throwable t) { devKitConnected = false; + stopDebugging(true); uiHandler.post(new Runnable() { @Override public void run() { diff --git a/doric-iOS/Devkit/Classes/DoricDev.m b/doric-iOS/Devkit/Classes/DoricDev.m index dd017e97..4ae6c969 100644 --- a/doric-iOS/Devkit/Classes/DoricDev.m +++ b/doric-iOS/Devkit/Classes/DoricDev.m @@ -132,6 +132,7 @@ - (void)onOpen { - (void)onClose { self.devKitConnected = NO; + [self stopDebugging:YES]; dispatch_async(dispatch_get_main_queue(), ^{ for (id callback in self.callbacks) { [callback onClose:self.url]; @@ -141,6 +142,7 @@ - (void)onClose { - (void)onFailure:(NSError *)error { self.devKitConnected = NO; + [self stopDebugging:YES]; dispatch_async(dispatch_get_main_queue(), ^{ for (id callback in self.callbacks) { [callback onFailure:error];