|
|
@@ -502,6 +502,10 @@ class Worker:
|
|
|
x = self.tasks.pop(p.sid, None)
|
|
|
if x:
|
|
|
x.cancel()
|
|
|
+ # Auto-exit when last participant leaves
|
|
|
+ if not self.room.remote_participants:
|
|
|
+ logger.info("Room empty, exiting")
|
|
|
+ asyncio.create_task(self.room.disconnect())
|
|
|
|
|
|
async def _run(self, sid, track):
|
|
|
logger.info("_run %s", sid)
|