-
Couldn't load subscription status.
- Fork 227
Open
Labels
status: waiting for informationMore information must be provided before work can proceedMore information must be provided before work can proceedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
I noticed several problems when disconnecting on Arduino Nano 33 BLE board. Code execution remained locked in the writeValue() function, specifically in the HCIClass::sendAclPkt() function. The code remained locked in the while loop, because the device is disconnected.
This is the original code:
while (_pendingPkt> = _maxPkt) {
poll ();
}I solved this way:
int k = 0;
while (_pendingPkt> = _maxPkt) {
k ++;
if (k> _maxPkt) break;
poll ();
}Everything seems to work well, when it freezes in the cycle if the counter k exceeds _maxPkt exits the cycle.
Is this the right way to correct? Has anyone found similar problems?
dtwaddell
Metadata
Metadata
Assignees
Labels
status: waiting for informationMore information must be provided before work can proceedMore information must be provided before work can proceedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project