BTBR: Fix stuck reconnection on null socket

This commit is contained in:
José Rebelo
2025-07-06 09:08:10 +01:00
parent 46d3f461e9
commit 35935275fa
@@ -145,6 +145,8 @@ public final class BtBRQueue {
} catch (IOException e) {
LOG.error("IO exception while establishing socket connection: ", e);
cleanup();
if (!GBApplication.getPrefs().getAutoReconnect(mGbDevice)) {
mGbDevice.setUpdateState(GBDevice.State.NOT_CONNECTED, mContext);
} else {
@@ -153,6 +155,8 @@ public final class BtBRQueue {
} catch (SecurityException e) {
LOG.error("Security exception while establishing socket connection: ", e);
cleanup();
if (!GBApplication.getPrefs().getAutoReconnect(mGbDevice)) {
mGbDevice.setUpdateState(GBDevice.State.NOT_CONNECTED, mContext);
} else {