# Does SDK always emit ConnectionState.Fail after Reconnecting?

**URL:** <https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566>\
**Category:** Video SDK\
**Created:** [June 27, 2025, 11:03am UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566 "2025-06-27T11:03:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anhtv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anhtv/32/67823_2.png) [@anhtv](https://devforum.zoom.us/u/anhtv)\
**Post date:** [June 27, 2025, 11:03am UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566/1 "2025-06-27T11:03:45Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/6/76444f1d4e8d0e99033c2d18510b77d4af91f36b.png)

While following this topic [Clarification on connection-change behavior with fail state and failover reason](https://devforum.zoom.us/t/clarification-on-connection-change-behavior-with-fail-state-and-failover-reason/134047), I noticed that after receiving `ConnectionState.Reconnecting`, it seems that the SDK always sends `ConnectionState.Fail` shortly afterward.

Could you please confirm if this is a guaranteed behavior?

We’re currently using **Zoom Video Web SDK v2.1.0**.

Thank you!

---

<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:** [June 27, 2025, 2:15pm UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566/2 "2025-06-27T14:15:41Z")

</div>

Hey @anhtv

Thanks for your feedback.

> Could you please confirm if this is a guaranteed behavior?

As I mentioned in the topic you referred:

- `ConnectionState.Fail`: This is a terminal state—reconnection failed.
- `ConnectionState.Reconnecting`: If reconnection succeeds, a subsequent `ConnectionState.Connected` event will be emitted.

`ConnectionState.Fail` is only returned when reconnection fails. If the network condition is poor and there is still no network during the reconnection attempt, it will result in a failed reconnection, triggering `ConnectionState.Fail`.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![anhtv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anhtv/32/67823_2.png) [@anhtv](https://devforum.zoom.us/u/anhtv)\
**Post date:** [July 1, 2025, 10:11am UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566/3 "2025-07-01T10:11:41Z")

</div>

Hi @vic.yang ,  
Sorry to trouble you again, and thank you for your previous support.

We have a few more questions regarding the SDK’s connection behavior:

1. Since the SDK automatically attempts to reconnect after emitting `ConnectionState.Reconnecting`, is it correct that the app only needs to handle `Connected` and `Fail` (e.g., trigger manual rejoin only after receiving `Fail`)?

2. If the app calls `join()` manually during this reconnecting state, will the SDK cancel its internal reconnect attempt?

3. If the SDK has almost finished reconnecting internally, but the app calls `join()` just before it emits `Connected`:  
– Will it result in `join()` failure?  
– If so, will `ConnectionState.Connected` still be emitted afterward?

Thanks in advance for your clarification!

---

<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:** [July 1, 2025, 10:33am UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566/4 "2025-07-01T10:33:10Z")

</div>

Hi @anhtv

> is it correct that the app only needs to handle `Connected` and `Fail` (e.g., trigger manual rejoin only after receiving `Fail` )?

Yes.

However, we recommend displaying a ‘reconnecting’ prompt to the user when `ConnectionState.Reconnecting` is received, because during this period, audio and video functionalities are unavailable.

> If the app calls `join()` manually during this reconnecting state, will the SDK cancel its internal reconnect attempt?

No

> If the SDK has almost finished reconnecting internally, but the app calls `join()` just before it emits `Connected`:

> – Will it result in `join()` failure?

Yes. It will return a rejected promise with `ExceptionCode.CLIENT_DUPLICATED_JOIN` and the reason ‘duplicated operation’.

> – If so, will `ConnectionState.Connected` still be emitted afterward?

Yes.

In short, when the connection-change event indicates `ConnectionState.Reconnecting`, you should **not** call the join method again, as it may lead to unexpected exceptions.

Thanks  
Vic

---

<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:** [July 2, 2025, 11:33am UTC](https://devforum.zoom.us/t/does-sdk-always-emit-connectionstate-fail-after-reconnecting/134566/5 "2025-07-02T11:33:24Z")

</div>

Closed on July 2, 2025, 11:33am UTC

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