How to avoid native session disconnect latency issues with Video API native SDKs? How to avoid native session disconnect latency issues with Video API native SDKs?

How to avoid native session disconnect latency issues with Video API native SDKs?

Yukari Dumburs

Symptom

This article explains how to avoid an issue that session disconnects with Video API native SDKs were taking longer than expected. This issue affects Android, iOS, Windows, macOS, and Linux users with SDK 2.26.0 or earlier since September 18, 2023. This issue does not affect JavaScript clients. The issue has been fixed in SDK 2.26.1. Also, the fix is available in legacy client versions 2.25.4 and 2.24.3.

Applies To

  • Android SDK
  • iOS SDK
  • Windows SDK
  • macOS SDK
  • Linux SDK
  • React Native SDK

Resolution

The recommended solution to this issue is:

  1. Use the SDK version where the fix is available:
    • Android, iOS, Windows, macOS, or Linux SDK 2.26.1 or higher
    • Android or iOS 2.25.4
    • Android or iOS 2.24.3

For users who are hesitant to change to these versions of the SDKs, here is another option to avoid the issue:

  1. Contact the Video API Support Team to disable the automatic reconnection feature for native SDKs. The automatic reconnection lets clients attempt to automatically reconnect to a session they disconnect unexpectedly (for example, due to a drop in network connectivity). Disabling automatic reconnections pauses the feature so that clients will immediately disconnect rather than having to wait for a reconnect timeout.  After this change, clients will need to reconnect to a session manually if they lose a connection due to the connectivity.

For suppressing unexpected stream received events please use the following workaround. Please note this workaround is not for preventing the disconnect event delay. 

  1. Update application code to explicitly unpublish, wait for the stream destroyed event, and then disconnect from the session.

Cause

The issue was due to the native SDKs improper handling of websocket disconnections. An update to Vonage’s signaling server to properly handle atypical disconnections exposed an unhandled websocket reconnection condition in the Vonage Native SDKs, requiring customer action.

Additional Information

This issue is listed as "This version fixes an issue where it sometimes took longer than expected to disconnect from a session." on the release note below: