From a5692d1076b4e6813e076f4e0cbef7d9a5032916 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sat, 5 Aug 2017 11:28:53 +0200 Subject: [PATCH] Don't attempt to start idleDisconnectMonitor again if RS is restarted. --- app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 72fe99c75d..8b2ccc590c 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -57,7 +57,10 @@ public class RuffyScripter { public void start() { try { ruffyService.addHandler(mHandler); - idleDisconnectMonitorThread.start(); + // TODO this'll be done better in v2 via ConnectionManager + if (idleDisconnectMonitorThread.getState() == Thread.State.NEW) { + idleDisconnectMonitorThread.start(); + } started = true; } catch (RemoteException e) { throw new RuntimeException(e);