# How to handle internet disconnection properly

**URL:** <https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018>\
**Category:** Web\
**Created:** [March 1, 2022, 4:50am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018 "2022-03-01T04:50:42Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 1, 2022, 4:50am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/1 "2022-03-01T04:50:42Z")

</div>

Currently, If a remote participant disconnects from internet for few seconds and then reconnects, then he is not able to hear other participant audio and video.  
What should be the proper way to handle internet disconnection?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [March 2, 2022, 9:47am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/2 "2022-03-02T09:47:35Z")

</div>

Hey @shoaib

Thanks for your feedback.

Failover processing has been integrated in the Video SDK. If it’s just a slight network thrashing and recovers quickly, it will trigger `connection-change` event, if the network is disconnected for a long time, the user should rejoin the session.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 11, 2022, 1:49pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/3 "2022-03-11T13:49:37Z")

</div>

Hey @vic.yang,

So I’m just disconnecting from wifi for around 20s seconds and reconnecting back, In such cases, video resumes back fine but seems like my audio gets disconnected or something as I’m not able to hear remote participant but **they are able to hear and see me fine.**

Do I need to call startAudio() or something, after reconnecting back?

---

<div class="post-metadata">

**Author:** ![ol\_mas](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ol\_mas](https://devforum.zoom.us/u/ol_mas)\
**Post date:** [March 11, 2022, 2:49pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/4 "2022-03-11T14:49:25Z")

</div>

I have a weird behavior with “failover”. The host ends the session, thus I imagine all users should be disconnected? Howerer, the client receives ‘Reconnecting’ before and restarts.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/4/a42d71d5d335f2a66a61d5274edd9ea8b7b18f07.png)

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 15, 2022, 8:24am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/5 "2022-03-15T08:24:03Z")

</div>

hey @vic.yang,  
can you please take a look into [this](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/3) as auto reconnection on internet disconnection was one of the feature because of which we switched to zoom video sdk.

Also, we have tested the same scenario in **sample app, the issue is there as well**. (video gets resumed but audio doesn’t get reconnected)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 17, 2022, 3:36pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/6 "2022-03-17T15:36:57Z")

</div>

Hey @shoaib , @ol_mas ,

Happy to investigate this further. Can I ask which browser you are using and which video SDK version?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 17, 2022, 4:09pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/7 "2022-03-17T16:09:00Z")

</div>

Video SDK Version: **1.2.0**  
Browser: **Chrome (Version 99.0.4844.51 (Official Build) (x86\_64))**

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 17, 2022, 4:37pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/8 "2022-03-17T16:37:49Z")

</div>

Thanks @shoaib , we will take a look!

-Tommy

---

<div class="post-metadata">

**Author:** ![ol\_mas](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ol\_mas](https://devforum.zoom.us/u/ol_mas)\
**Post date:** [March 18, 2022, 10:37am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/9 "2022-03-18T10:37:43Z")

</div>

Chrome: Version 99.0.4844.74 (Official Build) (64-bit)  
Video SDK Version: **1.2.0**

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [March 21, 2022, 8:54am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/10 "2022-03-21T08:54:30Z")

</div>

Hey @ol_mas

Thanks for your feedback.

We have found the cause of the issue, and it will be fixed in the next release. (ZOOM-357689)

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [March 21, 2022, 8:56am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/11 "2022-03-21T08:56:45Z")

</div>

Hey @shoaib

We have some issues with reconnecting the audio after session failover, and it will be fixed in the next release.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 28, 2022, 7:09am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/13 "2022-03-28T07:09:09Z")

</div>

I think in `1.2.3` reconnecting back on Failover is working fine, Thanks @tommy @vic.yang!

But I have one question, It seems like after failover state comes the Fail State (i.e. `state: 'Fail', reason: 'connection error'`), and I noticed that when this state arises, no reconnection happens,  
Is it like that only? and If its that then Why not just disconnect the user from the session (for remote participants also) on Fail State?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [March 28, 2022, 7:44am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/14 "2022-03-28T07:44:11Z")

</div>

Hey @shoaib

The `state:'Fail',reason:'connection error')` return value indicates the video sdk cannot reach any available servers. It usually occurs when the network is disconnected.

And for why others can still see the disconnected user in the session, our server has a hearbeat detection mechanism, when the disconnection exceeds two minutes, the user will be shown as leaving(disappeared in the user list).

We do this so that others don’t see you rejoining the session due to a short-term network disconnection or network switch.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 28, 2022, 8:06am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/15 "2022-03-28T08:06:40Z")

</div>

So, according to you If we reconnect within those two minutes, SDK will reconnect, Is that so? Because I’ve tried it and as soon as `state:'Fail',reason:'connection error'` this value gets returned (which is mostly within 30 seconds itself) **no reconnection happens** after that.

`Note: We are currently using private environment for testing.`

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [March 28, 2022, 8:18am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/16 "2022-03-28T08:18:54Z")

</div>

Hey @shoaib

Two minutes is the time others see you disappear from the user list if you don’t rejoin the session.

Video SDK will attempt to reconnect the session once the socket is closed, and if it still can not connect, will return ‘connection error’. So when you get the state:‘Fail’,reason:‘connection error’ error, you should rejoin the session manually. Hope this explanation can help you.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [March 28, 2022, 8:23am UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/17 "2022-03-28T08:23:34Z")

</div>

Thanks for the clarification @vic.yang !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 27, 2022, 6:24pm UTC](https://devforum.zoom.us/t/how-to-handle-internet-disconnection-properly/65018/18 "2022-04-27T18:24:24Z")

</div>

Closed on April 27, 2022, 6:24pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
