Skip to content

Commit a4d41d9

Browse files
committed
Fix spinSome logic (osrf#49)
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 <jacob@openrobotics.org>
1 parent 0b20500 commit a4d41d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rcljava/src/main/java/org/ros2/rcljava/executors/BaseExecutor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ private void spinSomeImpl(long maxDurationNs, boolean exhaustive) {
404404
AnyExecutable anyExecutable = getNextExecutable();
405405
if (anyExecutable != null) {
406406
executeAnyExecutable(anyExecutable);
407+
workAvailable = true;
407408
} else {
408409
if (!workAvailable || !exhaustive) {
409410
break;

0 commit comments

Comments
 (0)