Suppress CancelledError along with KeyboardInterrupt as a normal exit from server.run().
This commit is contained in:
1 parent
79e645a263
commit
aac27da67c
1 file changed
+1
-1
@@ -41,7 +41,7 @@ def run(
|
||||
conf["forwarded_allow_ips"] = proxy
|
||||
conf.update(uvicorn_config)
|
||||
|
||||
with suppress(KeyboardInterrupt):
|
||||
with suppress(KeyboardInterrupt, asyncio.CancelledError):
|
||||
if reload or workers:
|
||||
serve_multiprocess(endpoints, **conf)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user