missing global

This commit is contained in:
Marks Polakovs 2020-04-12 17:38:43 +02:00
parent 465f55fe59
commit a073d9a5d4

View file

@ -169,7 +169,7 @@ class Session(object):
await self.sender.process() await self.sender.process()
async def end(self) -> None: async def end(self) -> None:
global active_sessions global active_sessions, live_session
async with self.lock: async with self.lock:
if self.ended: if self.ended:
@ -235,7 +235,6 @@ class Session(object):
@self.pc.on("track") # type: ignore @self.pc.on("track") # type: ignore
async def on_track(track: MediaStreamTrack) -> None: async def on_track(track: MediaStreamTrack) -> None:
global active_sessions
print(self.connection_id, "Received track") print(self.connection_id, "Received track")
if track.kind == "audio": if track.kind == "audio":
print(self.connection_id, "Adding to Jack.") print(self.connection_id, "Adding to Jack.")