When recovering from connection loss, return to main menu to be ready for the net command.

This commit is contained in:
Johannes Mockenhaupt 2017-11-24 23:04:37 +01:00
parent 5e79900411
commit 5bd010d8f1
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -421,6 +421,12 @@ public class RuffyScripter implements RuffyCommands {
waitForScreenUpdate();
}
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"));
return connected;
} catch (RemoteException e) {