diff --git a/udphandler.cpp b/udphandler.cpp index 596afc3..f4156f2 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -1325,11 +1325,12 @@ void udpBase::sendRetransmitRequest() else if (rxMissing.size() > 100) { qDebug(logUdp()) << "Too many missing packets," << rxMissing.size() << "flushing all buffers"; missingMutex.lock(); - rxBufferMutex.lock(); - qDebug(logUdp()) << "Too many missing packets, full reset!"; - rxSeqBuf.clear(); rxMissing.clear(); missingMutex.unlock(); + + rxBufferMutex.lock(); + rxSeqBuf.clear(); + rxBufferMutex.unlock(); return; } diff --git a/udpserver.cpp b/udpserver.cpp index a922367..d1059dd 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -1690,10 +1690,10 @@ void udpServer::sendRetransmitRequest(CLIENT* c) } else if (c->rxMissing.size() > 100) { qDebug(logUdp()) << "Too many missing packets," << c->rxMissing.size() << "flushing all buffers"; - c->missMutex.lock(); c->rxMutex.lock(); - qDebug(logUdp()) << "Too many missing packets, full reset!"; c->rxSeqBuf.clear(); + c->rxMutex.unlock(); + c->missMutex.lock(); c->rxMissing.clear(); c->missMutex.unlock(); return;