Corerctly handle halt when queue was full and stuck in queue_head_block
authorJim Morris <morris@wolfman.com>
Wed, 20 Jul 2016 01:03:43 +0000 (18:03 -0700)
committerJim Morris <morris@wolfman.com>
Wed, 20 Jul 2016 01:03:43 +0000 (18:03 -0700)
src/modules/robot/Conveyor.cpp

index 214b486..9fee9f9 100644 (file)
@@ -165,6 +165,10 @@ void Conveyor::queue_head_block()
 
     // upstream caller will block on this until there is room in the queue
     while (queue.is_full()) {
+        if(halted) {
+            return; // if we got a halt then we are done here do not wait any longer
+        }
+
         //check_queue();
         THEKERNEL->call_event(ON_IDLE, this); // will call check_queue();
     }