# Calling client.leave() to end session is not triggering the client connection-change event

**URL:** <https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478>\
**Category:** Web\
**Created:** [March 24, 2021, 3:50pm UTC](https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478 "2021-03-24T15:50:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jremi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jremi/32/24847_2.png) [@jremi](https://devforum.zoom.us/u/jremi)\
**Post date:** [March 24, 2021, 3:50pm UTC](https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478/1 "2021-03-24T15:50:53Z")

</div>

**Description**  
Calling client.leave() to end session is not triggering the client connection-change event

**Error**  
After I am already connected and I then attempt to call `client.leave()` I get the following logs in the browser console:

```auto
cancelConsume interval null requestID null 
WebSocket is already in CLOSING or CLOSED state. index.umd.js:1 
WebSocket is already in CLOSING or CLOSED state. index.umd.js:1 
WebSocket is already in CLOSING or CLOSED state. index.umd.js:1 
WebSocket is already in CLOSING or CLOSED state. index.umd.js:1 

```

**Which Web Video SDK version?**  
`zoom-instant-sdk-web-1.0.2`

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. `client.join()` success !
2. `client.on('connection-change')` fires event with `state` of `Connected` success!
3. `client.leave()` // Did it actually leave and end session? Never getting connection-change event

**Device (please complete the following information):**

- Device: MacBook Pro (15-inch, 2019)
- OS: MacOS Catalina 10.15.6
- Browser: Chrome
- Browser Version: 88.0.4324.192 (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 24, 2021, 7:15pm UTC](https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478/2 "2021-03-24T19:15:13Z")

</div>

Hey @jremi ,

Thanks for reporting this issue. We are taking a look. (CS-3210)

-Tommy

---

<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 24, 2021, 5:15am UTC](https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478/3 "2021-04-24T05:15:15Z")

</div>

Closed on April 24, 2021, 5:15am UTC

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

---

<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:** [April 28, 2021, 5:27pm UTC](https://devforum.zoom.us/t/calling-client-leave-to-end-session-is-not-triggering-the-client-connection-change-event/46478/4 "2021-04-28T17:27:39Z")

</div>

Hey @jremi ,

This was fixed in the latest 1.0.3 release. Details here:

> [@Video SDK Web version 1.0.3](https://devforum.zoom.us/t/video-sdk-web-version-1-0-3/49113):
>
> Video SDK Web version 1.0.3 Hello Zoom Developers, here are the updates for the Video SDK Web version 1.0.3 release : Added Single View, a solution to present videos on browsers that are not capable of rendering multiple videos. For example, Firefox and Safari. The stream.isSupportMultipleVideos method. This method returns “yes” if the browser is capable of rendering multiple videos. Support share screen on Safari v14.0.3. The webEndpoint argument to init . Use if you want to use vanity URLs o…

Please download the latest version from the marketplace to get the updates. 🙂

Thanks,  
Tommy
