Bugfix: sleep *inside* the loop.
Whops, maxing out a core, draining the battery.
This commit is contained in:
parent
fcd6f4ea0e
commit
9cdd988bff
|
@ -61,7 +61,6 @@ public class RuffyScripter {
|
|||
@Override
|
||||
public void run() {
|
||||
long lastDisconnect = System.currentTimeMillis();
|
||||
SystemClock.sleep(1000);
|
||||
while (unrecoverableError == null) {
|
||||
try {
|
||||
long now = System.currentTimeMillis();
|
||||
|
@ -85,6 +84,7 @@ public class RuffyScripter {
|
|||
} catch (RemoteException e) {
|
||||
log.debug("Exception in idle disconnect monitor thread, carrying on", e);
|
||||
}
|
||||
SystemClock.sleep(1000);
|
||||
}
|
||||
}
|
||||
}, "idle-disconnect-monitor");
|
||||
|
|
Loading…
Reference in a new issue