From 1375ee053c90075d514ba4b2357ed9ed7a87e903 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 20 Nov 2017 19:14:21 +0100 Subject: [PATCH] Call rtDisconnect after connect timeout. --- .../java/de/jotomo/ruffyscripter/RuffyScripter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index ca198bafda..9b9cc3907d 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -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); } }