debug(e2ee): poll frame_cryptors() every 30s for state diagnosis
This commit is contained in:
13
voice.py
13
voice.py
@@ -339,8 +339,19 @@ class VoiceSession:
|
||||
except asyncio.TimeoutError:
|
||||
logger.error("Greeting timed out")
|
||||
|
||||
# Periodic E2EE state poll to diagnose incoming decryption
|
||||
_poll_count = 0
|
||||
while True:
|
||||
await asyncio.sleep(1)
|
||||
await asyncio.sleep(5)
|
||||
_poll_count += 1
|
||||
if _poll_count % 6 == 0: # Every 30s
|
||||
try:
|
||||
cryptors = self.lk_room.e2ee_manager.frame_cryptors()
|
||||
for c in cryptors:
|
||||
logger.info("E2EE_CRYPTOR: identity=%s key_index=%d enabled=%s",
|
||||
c.participant_identity, c.key_index, c.enabled)
|
||||
except Exception as e:
|
||||
logger.debug("frame_cryptors() failed: %s", e)
|
||||
|
||||
except asyncio.CancelledError:
|
||||
logger.info("Session cancelled for %s", self.room_id)
|
||||
|
||||
Reference in New Issue
Block a user