mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 18:47:40 +00:00
fix #505 - device can reboot due to race condition in sending
This commit is contained in:
parent
b9a1cae72d
commit
04942a3570
@ -243,13 +243,17 @@ void RadioLibInterface::handleTransmitInterrupt()
|
|||||||
|
|
||||||
void RadioLibInterface::completeSending()
|
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++;
|
txGood++;
|
||||||
printPacket("Completed sending", sendingPacket);
|
printPacket("Completed sending", p);
|
||||||
|
|
||||||
// We are done sending that packet, release it
|
// We are done sending that packet, release it
|
||||||
packetPool.release(sendingPacket);
|
packetPool.release(p);
|
||||||
sendingPacket = NULL;
|
|
||||||
// DEBUG_MSG("Done with send\n");
|
// DEBUG_MSG("Done with send\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user