# PeerConnection disconnected after about 30 seconds

**URL:** <https://react-native-webrtc.discourse.group/t/peerconnection-disconnected-after-about-30-seconds/1577>\
**Category:** Uncategorized\
**Created:** [June 22, 2022, 8:42pm UTC](https://react-native-webrtc.discourse.group/t/peerconnection-disconnected-after-about-30-seconds/1577 "2022-06-22T20:42:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abacovcin](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@abacovcin](https://react-native-webrtc.discourse.group/u/abacovcin)\
**Post date:** [June 22, 2022, 8:42pm UTC](https://react-native-webrtc.discourse.group/t/peerconnection-disconnected-after-about-30-seconds/1577/1 "2022-06-22T20:42:10Z")

</div>

In coding a 1-1 video and audio call, we find that we can successfully implement the call across a TURN server. Offer and answer are exchanged, as are ICE candidates, and the audio and video are correctly transmitted. However, after about 30 seconds, we find that both the remote video and audio freeze. Looking at the peer connection, we find that the connectionState changes to disconnected. We’re having difficulty tracking down what triggers the loss of connection and what to do to either avoid the disconnect or to reconnect when it happens.

---

<div class="post-metadata">

**Author:** ![8BallBomBom](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/8ballbombom/32/710_2.png) [@8BallBomBom](https://react-native-webrtc.discourse.group/u/8BallBomBom)\
**Post date:** [June 24, 2022, 7:10am UTC](https://react-native-webrtc.discourse.group/t/peerconnection-disconnected-after-about-30-seconds/1577/2 "2022-06-24T07:10:04Z")

</div>

Can you provide more information about each device in question.  
Like are they both Android? iOS to Android? iOS/Android to Browser?  
Not just that, are the devices on the same network?  
Also are you using a STUN server with the TURN server?  
And is the TURN server provided freely or paid?

---

<div class="post-metadata">

**Author:** ![abacovcin](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@abacovcin](https://react-native-webrtc.discourse.group/u/abacovcin)\
**Post date:** [June 24, 2022, 1:13pm UTC](https://react-native-webrtc.discourse.group/t/peerconnection-disconnected-after-about-30-seconds/1577/3 "2022-06-24T13:13:34Z")

</div>

We’ve identified it when both are Android. It doesn’t happen if both devices are connected to the same network. We are using a coturn server that we deployed on AWS. We had the behaviour when we gave both STUN and TURN connections to the coturn server and when we gave just TURN.
