Commit 0c42f4e
committed
fix(cable): treat ECONNRESET / EPIPE on L2CAP read as a clean close
After a successful CTAP ceremony the peer typically tears down the BLE
link without a clean L2CAP shutdown, so our read loop wakes up with
ECONNRESET (or EPIPE / UnexpectedEof) rather than n=0. Treat those the
same way we already treat a clean EOF: return Ok(None) when nothing is
buffered, ConnectionLost when half a message is. Stops the spurious
'Failed to read L2CAP message: ConnectionReset' error log that fires
after a successful MakeCredential.1 parent fd614e2 commit 0c42f4e
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
111 | 127 | | |
112 | 128 | | |
113 | 129 | | |
| |||
0 commit comments