try to fix weiredness with pebble reconnects

here
Andreas Shimokawa 2016-05-08 17:19:01 +02:00
parent 5b21895283
commit 9b7f2c1e91
1 changed files with 8 additions and 0 deletions

View File

@ -396,6 +396,14 @@ public class PebbleIoThread extends GBDeviceIoThread {
} catch (IOException ex) {
ex.printStackTrace();
LOG.info("error while reconnecting");
} finally {
try {
if (mBtServerSocket != null) {
mBtServerSocket.close();
mBtServerSocket = null;
}
} catch (IOException ignore) {
}
}
}
if (!mIsConnected) {