sforkowany z mirror/meshtastic-firmware
fix #505 - device can reboot due to race condition in sending
rodzic
b9a1cae72d
commit
04942a3570
|
@ -243,13 +243,17 @@ void RadioLibInterface::handleTransmitInterrupt()
|
|||
|
||||
void RadioLibInterface::completeSending()
|
||||
{
|
||||
if (sendingPacket) {
|
||||
// We are careful to clear sending packet before calling printPacket because
|
||||
// that can take a long time
|
||||
auto p = sendingPacket;
|
||||
sendingPacket = NULL;
|
||||
|
||||
if (p) {
|
||||
txGood++;
|
||||
printPacket("Completed sending", sendingPacket);
|
||||
printPacket("Completed sending", p);
|
||||
|
||||
// We are done sending that packet, release it
|
||||
packetPool.release(sendingPacket);
|
||||
sendingPacket = NULL;
|
||||
packetPool.release(p);
|
||||
// DEBUG_MSG("Done with send\n");
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue