| Message ID | 20260730183254.793698-3-JPEWhacker@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | hashserv: Pipeline Upstream Queries | expand |
diff --git a/lib/bb/asyncrpc/serv.py b/lib/bb/asyncrpc/serv.py index bd1aded8d..d3b1c6c35 100644 --- a/lib/bb/asyncrpc/serv.py +++ b/lib/bb/asyncrpc/serv.py @@ -334,7 +334,7 @@ class AsyncServer(object): self.loop.add_signal_handler(signal.SIGQUIT, self.signal_handler) signal.pthread_sigmask(signal.SIG_UNBLOCK, [signal.SIGTERM]) - self.loop.run_until_complete(asyncio.gather(*tasks)) + self.loop.run_until_complete(bb.asyncrpc.TaskGroup.run(*tasks)) self.logger.debug("Server shutting down") finally:
Uses a task group instead of asyncio.gather(). The task group ensures that all tasks are canceled if an exception occurs, which asyncio.gather() does not. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- lib/bb/asyncrpc/serv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)