feat:stop debugging when devkit is disconnected from server
This commit is contained in:
parent
2e678b1231
commit
a40ec58fca
@ -183,6 +183,7 @@ public class DoricDev {
|
|||||||
|
|
||||||
public void onClose() {
|
public void onClose() {
|
||||||
devKitConnected = false;
|
devKitConnected = false;
|
||||||
|
stopDebugging(true);
|
||||||
uiHandler.post(new Runnable() {
|
uiHandler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -195,6 +196,7 @@ public class DoricDev {
|
|||||||
|
|
||||||
public void onFailure(final Throwable t) {
|
public void onFailure(final Throwable t) {
|
||||||
devKitConnected = false;
|
devKitConnected = false;
|
||||||
|
stopDebugging(true);
|
||||||
uiHandler.post(new Runnable() {
|
uiHandler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -132,6 +132,7 @@ - (void)onOpen {
|
|||||||
|
|
||||||
- (void)onClose {
|
- (void)onClose {
|
||||||
self.devKitConnected = NO;
|
self.devKitConnected = NO;
|
||||||
|
[self stopDebugging:YES];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
for (id <DoricDevStatusCallback> callback in self.callbacks) {
|
for (id <DoricDevStatusCallback> callback in self.callbacks) {
|
||||||
[callback onClose:self.url];
|
[callback onClose:self.url];
|
||||||
@ -141,6 +142,7 @@ - (void)onClose {
|
|||||||
|
|
||||||
- (void)onFailure:(NSError *)error {
|
- (void)onFailure:(NSError *)error {
|
||||||
self.devKitConnected = NO;
|
self.devKitConnected = NO;
|
||||||
|
[self stopDebugging:YES];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
for (id <DoricDevStatusCallback> callback in self.callbacks) {
|
for (id <DoricDevStatusCallback> callback in self.callbacks) {
|
||||||
[callback onFailure:error];
|
[callback onFailure:error];
|
||||||
|
Reference in New Issue
Block a user