When recovering from connection loss, return to main menu to be ready for the net command.
This commit is contained in:
parent
5e79900411
commit
5bd010d8f1
1 changed files with 6 additions and 0 deletions
|
@ -421,6 +421,12 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
waitForScreenUpdate();
|
waitForScreenUpdate();
|
||||||
}
|
}
|
||||||
boolean connected = ruffyService.isConnected();
|
boolean connected = ruffyService.isConnected();
|
||||||
|
if (connected) {
|
||||||
|
MenuType menuType = getCurrentMenu().getType();
|
||||||
|
if (menuType != MenuType.MAIN_MENU && menuType != MenuType.WARNING_OR_ERROR) {
|
||||||
|
returnToRootMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
log.debug("Recovery from connection loss " + (connected ? "succeeded" : "failed"));
|
log.debug("Recovery from connection loss " + (connected ? "succeeded" : "failed"));
|
||||||
return connected;
|
return connected;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|
Loading…
Reference in a new issue