# Disconnect or unsubscribe duplicate client from the same LiveQuery

**URL:** <https://community.parseplatform.org/t/disconnect-or-unsubscribe-duplicate-client-from-the-same-livequery/3029>\
**Category:** Cloud Code\
**Created:** [November 3, 2022, 10:08am UTC](https://community.parseplatform.org/t/disconnect-or-unsubscribe-duplicate-client-from-the-same-livequery/3029 "2022-11-03T10:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihmmsr8](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/i/e99b99/32.png) [@ihmmsr8](https://community.parseplatform.org/u/ihmmsr8)\
**Post date:** [November 3, 2022, 10:08am UTC](https://community.parseplatform.org/t/disconnect-or-unsubscribe-duplicate-client-from-the-same-livequery/3029/1 "2022-11-03T10:08:03Z")

</div>

Hi.  
I need some help please.  
sometimes LiveQuery events trigger twice or more from my Android app…I know that is because the LiveQuery setup is not well in my Android app.  
my question is:  
Is there a way in Cloud Code to prevent a client from connecting to the same LiveQuery twice that already has connected from my Android app?  
thank you.

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [November 10, 2022, 7:41pm UTC](https://community.parseplatform.org/t/disconnect-or-unsubscribe-duplicate-client-from-the-same-livequery/3029/2 "2022-11-10T19:41:11Z")

</div>

I’m not sure if there’s an easy way but you can try something using [the before Connect trigger](https://docs.parseplatform.org/cloudcode/guide/#beforeconnect). I’d rather fix the Android app though.

---

<div class="post-metadata">

**Author:** ![ihmmsr8](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/i/e99b99/32.png) [@ihmmsr8](https://community.parseplatform.org/u/ihmmsr8)\
**Post date:** [November 12, 2022, 9:52am UTC](https://community.parseplatform.org/t/disconnect-or-unsubscribe-duplicate-client-from-the-same-livequery/3029/3 "2022-11-12T09:52:59Z")

</div>

Thank you for the reply.  
Is there a way to know if the the client has delivered the livequery ?because when the internet of the client is off suddenly, the client is still connected to livequery, so i dont know if the the client has delivered the livequery or not
