# Transport connectionstate never changes to 'failed', stuck on 'disconnected'

**URL:** <https://mediasoup.discourse.group/t/transport-connectionstate-never-changes-to-failed-stuck-on-disconnected/4125>\
**Category:** mediasoup libraries\
**Created:** [April 24, 2022, 10:02am UTC](https://mediasoup.discourse.group/t/transport-connectionstate-never-changes-to-failed-stuck-on-disconnected/4125 "2022-04-24T10:02:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 24, 2022, 2:28pm UTC](https://mediasoup.discourse.group/t/transport-connectionstate-never-changes-to-failed-stuck-on-disconnected/4125/2 "2022-04-24T14:28:52Z")

</div>

Just my two cents:

When a user requests for a transport, there should ideally be a timeout setup to safely close the transport and as well alert the user of an audio/video could not be connected at this time error; try again.  
If the transport is not connected within several seconds to throw this timeout.

With each transport requiring to be connected once or be closed, you can watch at a client level the connectionstate and if that hits disconnected you can wait several seconds for recovery (unless they closed broadcast/etc) if recovery doesn’t occur and the stream is still hosted you can request ice every so often till connection returns to solid.

If user disconnects entirely from websocket, you should completely destroy any transports they were using.

---

_[View the full topic](https://mediasoup.discourse.group/t/transport-connectionstate-never-changes-to-failed-stuck-on-disconnected/4125)._
