RuffyScripter: only set connected variable in rtConnected, rtDisconnected.
Hopefully fixes intermittent failures to close the connection, as idleDisconnectMonitorThread sometimes fails to disconnect because connected == false.
This commit is contained in:
parent
e322b15e1c
commit
a1564d5bb7
|
@ -70,7 +70,6 @@ public class RuffyScripter {
|
|||
// don't disconnect too frequently, confuses ruffy?
|
||||
&& now > lastDisconnect + 15 * 1000) {
|
||||
log.debug("Disconnecting after " + (connectionTimeOutMs / 1000) + "s inactivity timeout");
|
||||
connected = false;
|
||||
lastDisconnect = now;
|
||||
ruffyService.doRTDisconnect();
|
||||
SystemClock.sleep(1000);
|
||||
|
@ -295,7 +294,6 @@ public class RuffyScripter {
|
|||
// waitForMenuUpdate times out after 60s and throws a CommandException
|
||||
waitForMenuUpdate();
|
||||
}
|
||||
connected = true;
|
||||
} catch (RemoteException e) {
|
||||
throw new CommandException().exception(e).message("Unexpected exception while initiating/restoring pump connection");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue