diff --git a/voice.py b/voice.py index be591f8..b5b9ad0 100644 --- a/voice.py +++ b/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)