Merge pull request #1934 from counterleft/use-disconnect-on-small-webrtc-connection-example

Fix type checker error with missing function call in the small WebRTC transport example
This commit is contained in:
Mark Backman
2025-06-02 11:17:30 -04:00
committed by GitHub
5 changed files with 5 additions and 5 deletions

View File

@@ -156,7 +156,7 @@ async def offer(request: dict, background_tasks: BackgroundTasks):
@asynccontextmanager
async def lifespan(app: FastAPI):
yield # Run app
coros = [pc.close() for pc in pcs_map.values()]
coros = [pc.disconnect() for pc in pcs_map.values()]
await asyncio.gather(*coros)
pcs_map.clear()

View File

@@ -74,7 +74,7 @@ async def offer(request: dict, background_tasks: BackgroundTasks):
@asynccontextmanager
async def lifespan(app: FastAPI):
yield # Run app
coros = [pc.close() for pc in pcs_map.values()]
coros = [pc.disconnect() for pc in pcs_map.values()]
await asyncio.gather(*coros)
pcs_map.clear()

View File

@@ -74,7 +74,7 @@ async def offer(request: dict, background_tasks: BackgroundTasks):
@asynccontextmanager
async def lifespan(app: FastAPI):
yield # Run app
coros = [pc.close() for pc in pcs_map.values()]
coros = [pc.disconnect() for pc in pcs_map.values()]
await asyncio.gather(*coros)
pcs_map.clear()

View File

@@ -69,7 +69,7 @@ async def serve_index():
@asynccontextmanager
async def lifespan(app: FastAPI):
yield # Run app
coros = [pc.close() for pc in pcs_map.values()]
coros = [pc.disconnect() for pc in pcs_map.values()]
await asyncio.gather(*coros)
pcs_map.clear()

View File

@@ -142,7 +142,7 @@ def run_example_webrtc(
@asynccontextmanager
async def lifespan(app: FastAPI):
yield # Run app
coros = [pc.close() for pc in pcs_map.values()]
coros = [pc.disconnect() for pc in pcs_map.values()]
await asyncio.gather(*coros)
pcs_map.clear()