# send transport's dtlsState is connected, but recv remains connecting

**URL:** <https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507>\
**Category:** mediasoup libraries\
**Created:** [August 26, 2022, 2:49am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507 "2022-08-26T02:49:10Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [September 1, 2022, 5:53am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/21 "2022-09-01T05:53:45Z")

</div>

Muted is not for audio, it is for video also. It is related to track, if it is muted then it means data is not being transmitted/received.

---

<div class="post-metadata">

**Author:** ![Aids](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aids](https://mediasoup.discourse.group/u/Aids)\
**Post date:** [September 1, 2022, 9:13am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/22 "2022-09-01T09:13:02Z")

</div>

![local](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/8/850c26d5bac915e7a91e170a0700059abf7cc8a2.png)  
 ![remote](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/7/76f32fac08aac516b051ec128e3ab6da273fd002.png)

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [September 1, 2022, 9:17am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/23 "2022-09-01T09:17:40Z")

</div>

Looks all good, make sure to resume the consumer as well. In v3 we create consumer in paused state and the resume it later on, it is recommended. Check if there is something like this in v2.

Also you mentioned about third connection, you need to check it why it is being created more specifically you need to get the track id and compare it in webrtc-internals to see which peer connection is giving you stream.

---

<div class="post-metadata">

**Author:** ![Aids](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aids](https://mediasoup.discourse.group/u/Aids)\
**Post date:** [September 2, 2022, 2:39am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/25 "2022-09-02T02:39:05Z")

</div>

each peer has two peerConnections, one for the send and one for the recv, I assume. maybe the extra one is irrelevant regardless? because it becomes closed and disappears eventually.  
I had three peers into the same room on the same browser, and here’s what I got.

 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/4/4316d9a6902ab5850be6c42c7f221c8a8a020986.png)  
I let the server close a peer after having its recv transport not connected in 30secs, so there’s a “closed” state in this screenshot.  
all of them were connected and the “new” closed and disappeared very soon. leaving the fine connections.  
within each pid, there was one local and one remote, having both succeeded, I think that should’ve been enough to get things working.  
the problem should be on the server-side, any possible causes?

---

<div class="post-metadata">

**Author:** ![Aids](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aids](https://mediasoup.discourse.group/u/Aids)\
**Post date:** [September 2, 2022, 2:48am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/26 "2022-09-02T02:48:27Z")

</div>

router.post(‘/joinRoom’, async (req, res) =\> {  
[//console.info](https://console.info)(“join params:”,req.body);  
const params = req.body;  
const room = getRoom(params.id);  
try{  
const msp = await room.receiveRequest(params.request);  
peerRoomMap[params.request.peerName] = params.id  
res.status(200).json({code:“000000”,data:{msp}})  
}  
catch(e){  
console.error(“join failed:”,e)  
res.status(500).json({code:“000001”,data:{e}})  
}  
})

router.post(‘/leaveRoom’, (req,res)=\>{  
const params = req.body;  
const rid = peerRoomMap[params.name]  
removePeer(rid,params.name);  
delete peerRoomMap[params.name]  
res.status(200).json({code:“000000”})  
})

router.post(‘/connectPeers’, async (req,res)=\>{  
const params = req.body  
const room = getRoom(params.id)  
try{  
[//console.info](https://console.info)(“processing msp:”,params.request);  
const peer = room.getPeerByName(params.name)  
const msp = await peer.receiveRequest(params.request)  
res.status(200).json({code:“000000”,data:{msp}});  
}  
catch(e){  
console.error(“connect failed:”,e);  
res.status(200).json({code:“000001”,data:{e}});  
}

})

here’s everything I did with the rooms, “/connectPeers” and “/joinRoom” are the routes I handle the mediasoup-protocol requests. there were no other processes.

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [September 2, 2022, 5:58am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/27 "2022-09-02T05:58:00Z")

</div>

That extra peer is ok, it happens on my side as well so it can be ignored, if all other peer are in connected state then all is ok.

Console the tracks being received expand it in console and send me screenshot need to see the attributes.

Apart from that if you can deploy it somewhere and send me the link then i can better look into it, as it is really difficult to guess the issue.

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [September 2, 2022, 5:59am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/28 "2022-09-02T05:59:27Z")

</div>

You are creating new application or it is and old application? If it is old then was it working ok earlier? If it is new app then why you are using v2? you should use v3.

---

<div class="post-metadata">

**Author:** ![Aids](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aids](https://mediasoup.discourse.group/u/Aids)\
**Post date:** [September 2, 2022, 6:26am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/29 "2022-09-02T06:26:56Z")

</div>

a new application.  
I’m gonna switch to v3 right now.  
couldn’t install v3 last week due to some dependencies that I consistently failed to download from the given github url. at that moment I decided to try v2.  
today I found a mirror of v3, gotta start over real quick.

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [September 2, 2022, 6:28am UTC](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507/30 "2022-09-02T06:28:56Z")

</div>

Man, go with v3, v2 is quite old and very much different from v3. Go with v3, 3.9.0. you will surely be on right path.

[Previous page](https://mediasoup.discourse.group/t/send-transports-dtlsstate-is-connected-but-recv-remains-connecting/4507.md?page=1)
