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

Commit

Permalink
Don't close PeerConnection when chat-ua is received. (#700)
Browse files Browse the repository at this point in the history
When local endpoint is a caller, chat-ua is received after the PeerConnection is created.
  • Loading branch information
jianjunz authored Apr 3, 2023
1 parent efc1379 commit b89f308
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions talk/owt/sdk/p2p/p2pclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,6 @@ void P2PClient::OnSignalingMessage(const std::string& message,

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

0 comments on commit b89f308

Please sign in to comment.