Skip to content

Commit ed3f6b6

Browse files
committed
fix types
1 parent 2e842a9 commit ed3f6b6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/idom/server/_asgi.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ async def serve_development_asgi(
2828
coros: list[Awaitable[Any]] = [server.serve()]
2929

3030
if started:
31-
32-
async def check_if_started() -> None:
33-
while not server.started:
34-
await asyncio.sleep(0.2)
35-
started.set()
36-
37-
coros.append(check_if_started())
31+
coros.append(_check_if_started(server, started))
3832

3933
try:
4034
await asyncio.gather(*coros)
4135
finally:
4236
await asyncio.wait_for(server.shutdown(), timeout=3)
37+
38+
39+
async def _check_if_started(server: UvicornServer, started: asyncio.Event) -> None:
40+
while not server.started:
41+
await asyncio.sleep(0.2)
42+
started.set()

0 commit comments

Comments
 (0)