Commit aadcaf1
fix(android): detect stale socket in connectToSocket guard
isConnectedLocally can be stale after a remote disconnect because
connectionReceiver sets it true on ACL_CONNECTED before connectToSocket
runs. Now verify the socket is actually alive by probing inputStream
before skipping reconnection. If the socket is dead, reset the flag
and proceed with a fresh connection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 725cfb7 commit aadcaf1
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2427 | 2427 | | |
2428 | 2428 | | |
2429 | 2429 | | |
2430 | | - | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
2431 | 2438 | | |
2432 | 2439 | | |
2433 | 2440 | | |
| |||
0 commit comments