Skip to content

Commit 7fb3dfe

Browse files
authored
(RclJava) fix BaseExecutor.spinSome logic - run the executable even if it found (#134)
1 parent 95fefa6 commit 7fb3dfe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ protected void spinSome() {
332332
AnyExecutable anyExecutable = getNextExecutable();
333333
if (anyExecutable == null) {
334334
waitForWork(0);
335-
do {
336-
anyExecutable = getNextExecutable();
337-
if (anyExecutable != null) {
338-
executeAnyExecutable(anyExecutable);
339-
}
340-
} while (anyExecutable != null);
335+
anyExecutable = getNextExecutable();
336+
}
337+
338+
while (anyExecutable != null) {
339+
executeAnyExecutable(anyExecutable);
340+
anyExecutable = getNextExecutable();
341341
}
342342
}
343343

0 commit comments

Comments
 (0)