Fix assert

This commit is contained in:
Thomas Göttgens 2022-11-06 18:36:17 +01:00 committed by GitHub
parent 5c214bf4d8
commit 6934e0bce7
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