Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit b89f308

Browse files
authored
Don't close PeerConnection when chat-ua is received. (#700)
When local endpoint is a caller, chat-ua is received after the PeerConnection is created.
1 parent efc1379 commit b89f308

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

talk/owt/sdk/p2p/p2pclient.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,6 @@ void P2PClient::OnSignalingMessage(const std::string& message,
320320

321321
return;
322322
}
323-
} else if (message.find("\"type\":\"chat-ua\"") != std::string::npos) {
324-
// "chat-ua" is the 1st message of a new connection. If there is an old
325-
// PCC exists, close it and create a new one.
326-
auto pcc = that->GetPeerConnectionChannel(remote_id);
327-
// Don't send stop to remote.
328-
pcc->SetAbandoned();
329-
{
330-
const std::lock_guard<std::mutex> lock(that->pc_channels_mutex_);
331-
that->pc_channels_.erase(remote_id);
332-
}
333323
}
334324
// Secondly dispatch the message to pcc.
335325
auto pcc = that->GetPeerConnectionChannel(remote_id);

0 commit comments

Comments
 (0)