Merge pull request #1911 from meshtastic/caveman99-patch-1

Fix assert
This commit is contained in:
Thomas Göttgens 2022-11-06 19:06:26 +01:00 committed by GitHub
commit 962a3d0c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,13 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
void RadioLibInterface::handleReceiveInterrupt()
{
uint32_t xmitMsec;
assert(isReceiving);
// when this is called, we should be in receive mode - if we are not, just jump out instead of bombing. Possible Race Condition?
if (!isReceiving) {
DEBUG_MSG("*** WAS_ASSERT *** handleReceiveInterrupt called when not in receive mode\n");
return;
}
isReceiving = false;
// read the number of actually received bytes