From f815ad80574cdcbf20d0d247a185bb38a4714a26 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Mon, 9 Nov 2020 15:13:33 -0800 Subject: [PATCH] Fix spinSome logic The workAvailable flag was never being set to true. If I understand the original intention, I think that the flag should be set as long as there are things being executed. Signed-off-by: Jacob Perron --- .../src/main/java/org/ros2/rcljava/executors/BaseExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/rcljava/src/main/java/org/ros2/rcljava/executors/BaseExecutor.java b/rcljava/src/main/java/org/ros2/rcljava/executors/BaseExecutor.java index 1ed9218e..67c15fda 100644 --- a/rcljava/src/main/java/org/ros2/rcljava/executors/BaseExecutor.java +++ b/rcljava/src/main/java/org/ros2/rcljava/executors/BaseExecutor.java @@ -404,6 +404,7 @@ private void spinSomeImpl(long maxDurationNs, boolean exhaustive) { AnyExecutable anyExecutable = getNextExecutable(); if (anyExecutable != null) { executeAnyExecutable(anyExecutable); + workAvailable = true; } else { if (!workAvailable || !exhaustive) { break;