Avoid closing drain before seeing first message in either topic

This commit is contained in:
Nuno Campos
2024-09-11 16:45:43 -07:00
parent dd68babac7
commit 571623442a
+4
View File
@@ -32,7 +32,9 @@ async def drain_topics_async(
def done() -> bool:
return (
len(orch_msgs) > 0
and any(orch_msgs)
and len(exec_msgs) > 0
and any(exec_msgs)
and not orch_msgs[-1]
and not exec_msgs[-1]
)
@@ -97,7 +99,9 @@ def drain_topics(
def done() -> bool:
return (
len(orch_msgs) > 0
and any(orch_msgs)
and len(exec_msgs) > 0
and any(exec_msgs)
and not orch_msgs[-1]
and not exec_msgs[-1]
)