Don't grab lock in increment_it if we are deleting cuz we will hang

This commit is contained in:
Isaac Connor 2021-04-17 11:35:41 -04:00
parent 96deedfd53
commit 5ab9a48599
1 changed files with 1 additions and 1 deletions

View File

@ -577,7 +577,7 @@ void PacketQueue::unlock(ZMLockedPacket *lp) {
bool PacketQueue::increment_it(packetqueue_iterator *it) {
Debug(2, "Incrementing %p, queue size %d, end? %d", it, pktQueue.size(), ((*it) == pktQueue.end()));
if ((*it) == pktQueue.end()) {
if ((*it) == pktQueue.end() or deleting) {
return false;
}
std::unique_lock<std::mutex> lck(mutex);