always emit exceptions (also when enable_web is false)

replaces enable_web check with loop.is_running()
This commit is contained in:
Mose Müller
2025-06-19 09:44:38 +02:00
parent ff1654e65c
commit e5b89f2581

View File

@ -319,7 +319,7 @@ class Server:
# here we exclude most kinds of exceptions from triggering this kind of shutdown # here we exclude most kinds of exceptions from triggering this kind of shutdown
exc = context.get("exception") exc = context.get("exception")
if type(exc) not in [RuntimeError, KeyboardInterrupt, asyncio.CancelledError]: if type(exc) not in [RuntimeError, KeyboardInterrupt, asyncio.CancelledError]:
if self._enable_web: if loop.is_running():
async def emit_exception() -> None: async def emit_exception() -> None:
try: try: