Call rtDisconnect after connect timeout.

This commit is contained in:
Johannes Mockenhaupt 2017-11-20 19:14:21 +01:00
parent 16c97acf4e
commit 1375ee053c
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -446,8 +446,18 @@ public class RuffyScripter implements RuffyCommands {
SystemClock.sleep(50);
}
} catch (CommandException e) {
try {
ruffyService.doRTDisconnect();
} catch (RemoteException e1) {
log.warn("Disconnect after connect failure failed", e1);
}
throw e;
} catch (Exception e) {
try {
ruffyService.doRTDisconnect();
} catch (RemoteException e1) {
log.warn("Disconnect after connect failure failed", e1);
}
throw new CommandException("Unexpected exception while initiating/restoring pump connection", e);
}
}