Skip to content

Commit 1657b89

Browse files
committed
try again
1 parent 8f4ac8c commit 1657b89

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/reactpy/backend/_common.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ async def serve_development_asgi(
4949

5050
try:
5151
await asyncio.gather(*coros)
52-
except Exception:
53-
if server.started:
54-
await asyncio.wait_for(server.shutdown(), timeout=3)
52+
finally:
53+
if not server.servers:
54+
server.servers = []
55+
await asyncio.wait_for(server.shutdown(), timeout=3)
5556

5657

5758
async def _check_if_started(server: uvicorn.Server, started: asyncio.Event) -> None:

0 commit comments

Comments
 (0)