File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ void Event::Run() {
686
686
// The idea is to process the queue no matter what so that all packets get processed.
687
687
// We only break if the queue is empty
688
688
while (!terminate_ and !zm_terminate) {
689
- ZMLockedPacket *packet_lock = packetqueue->get_packet (packetqueue_it);
689
+ ZMLockedPacket *packet_lock = packetqueue->get_packet_no_wait (packetqueue_it);
690
690
if (packet_lock) {
691
691
std::shared_ptr<ZMPacket> packet = packet_lock->packet_ ;
692
692
if (!packet->decoded ) {
@@ -721,7 +721,8 @@ void Event::Run() {
721
721
// Important not to increment it until after we are done with the packet because clearPackets checks for iterators pointing to it.
722
722
packetqueue->increment_it (packetqueue_it);
723
723
} else {
724
- return ;
724
+ if (terminate_ or zm_terminate) return ;
725
+ usleep (10000 );
725
726
} // end if packet_lock
726
727
} // end while
727
728
} // end Run()
You can’t perform that action at this time.
0 commit comments