Thank you for reaching out. Based on the information available, LiveKit handles WebSocket disconnections through various mechanisms, including reconnection attempts and ICE restarts. Disconnections can occur due to several reasons, such as network changes, state mismatches, or server-related issues.
To troubleshoot your specific issue, please ensure the following:
• Verify that your network allows WebRTC connections, including ICE over UDP and TURN with UDP.
• Check if there are any network changes or restrictions that might be causing the disconnection.
• Ensure that the WebSocket connection is being properly maintained and not closed prematurely by the client or server.
If the issue persists, could you provide additional details such as:
• The exact error message or logs, if available.
• Steps to reproduce the issue.
• Any specific configurations or settings you are using.
With this information, we can assist you further in identifying the root cause of the disconnection.
Sources:
livekit.agents API documentation |
Connecting to LiveKit | LiveKit Docs |
Enum DisconnectReason | LiveKit Unity SDK |
DisconnectReason |
livekit.agents API documentation