We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23eca25 commit f8b12b1Copy full SHA for f8b12b1
coagent/cli/main.py
@@ -7,6 +7,7 @@
7
8
from coagent.core import Address, RawMessage, set_stderr_logger
9
from coagent.core.exceptions import BaseError
10
+from coagent.core.messages import Cancel
11
from coagent.runtimes import NATSRuntime, HTTPRuntime
12
13
@@ -68,6 +69,8 @@ async def run(
68
69
else:
70
async for chunk in runtime.channel.publish_multi(addr, msg):
71
print_msg(chunk, oneline, filter)
72
+ except asyncio.CancelledError:
73
+ await runtime.channel.publish(addr, Cancel().encode(), probe=False)
74
except BaseError as exc:
75
print(f"Error: {exc}")
76
0 commit comments