Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect loss of connection #28

Closed
julien-l opened this issue Oct 24, 2018 · 1 comment
Closed

Detect loss of connection #28

julien-l opened this issue Oct 24, 2018 · 1 comment
Assignees
Labels

Comments

@julien-l
Copy link

Description

How to detect disconnection from an empty room with the Twilio SDK upon a loss of Internet connection?

For when the room is not empty, I can monitor the number bytes/packets received returned by getStatsWithBlock(); when they stop increasing, I can assume a loss of connection. But I was unable to find any useful stats when the room is empty.

Certainly related to known issue "Participant disconnect event can take up to 120 seconds to occur. #99"

Steps to Reproduce

  1. Connect to an empty room
  2. Disconnect the device from Wi-Fi
  3. No room disconnection is detected

Versions

Twilio SDK 2.5.2
iOS version > 11

@piyushtank
Copy link
Contributor

piyushtank commented Oct 24, 2018

@julien-l With our current implementation, the Video SDK internally runs SIP signaling session timer of 120 seconds. If the network is lost completely, the SDK waits upto the session timer expiry for network connection establishment. This is a similar issue it takes upto 120 seconds for remote participant to detect the disconnect.

We are planning to make changes in our signaling layer in later this quarter. We are planning to move away from the SIP and implement better signaling for mobile SDKs. With the new signaling implementation, the disconnect event will not take up to 120 seconds. With new implementation, the disconnected event may get invoked within 30 seconds but please note that we are still discussing on how sooner the event should get fired because the tradeoff is heartbeat between the SDK and the infrastructure.

@piyushtank piyushtank self-assigned this Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants