This repository was archived by the owner on Nov 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cellular fix for sockets: spot dead sockets. (#845)
If, for some reason, a socket is dropped and no URC is emitted to say so (shouldn't happen but can be caused with an injection of AT+COPS=2, and of course, who knows?) the uCellSockRead() and uCellSockReceiveFrom() functions won't necessarily notice. With this commit the "pending" check at the start of both functions is modified to flag an IO error if the AT command querying the amount of data pending on the socket fails; previously the pending check would have ignored any errors, relying on the subsequent half of the read call to pick those up.
- Loading branch information