server: implement FINAL_SUMMARY for websocket + update tests and fix flush

This commit is contained in:
Mathieu Virbel
2023-08-08 19:32:20 +02:00
parent 93564bfd89
commit 7f807c8f5f
5 changed files with 86 additions and 38 deletions

View File

@@ -72,7 +72,7 @@ class StreamClient:
async def on_connectionstatechange():
self.logger.info(f"Connection state is {pc.connectionState}")
if pc.connectionState == "failed":
await pc.close()
await self.stop()
self.pcs.discard(pc)
@pc.on("track")
@@ -87,7 +87,7 @@ class StreamClient:
self.pc.addTrack(audio)
self.track_audio = audio
channel = pc.createDataChannel("data-channel")
self.channel = channel = pc.createDataChannel("data-channel")
self.logger = self.logger.bind(channel=channel.label)
self.logger.info("Created by local party")