Pebble: fix stupid bug that broke active reconnection

here
Andreas Shimokawa 2016-02-06 19:35:49 +01:00
parent 85bad9abf5
commit 59d6553c54
1 changed files with 1 additions and 1 deletions

View File

@ -362,7 +362,7 @@ public class PebbleIoThread extends GBDeviceIoThread {
if (reconnectAttempts > 0) {
gbDevice.setState(GBDevice.State.CONNECTING);
gbDevice.sendDeviceUpdateIntent(getContext());
while (reconnectAttempts-- > 0 && !mQuit) {
while (reconnectAttempts-- > 0 && !mQuit && !mIsConnected) {
LOG.info("Trying to reconnect (attempts left " + reconnectAttempts + ")");
mIsConnected = connect(gbDevice.getAddress());
}