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