mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix illegal access to IceTransport's member function in lambda
This commit is contained in:
@@ -594,7 +594,7 @@ void PeerConnection::ProcessIceWorkMsg(const IceWorkMsg &msg) {
|
||||
LOG_INFO("]");
|
||||
|
||||
for (auto &remote_user_id : user_id_list) {
|
||||
ice_transport_list_[remote_user_id] = std::make_unique<IceTransport>(
|
||||
ice_transport_list_[remote_user_id] = std::make_shared<IceTransport>(
|
||||
true, transmission_id, user_id_, remote_user_id, ws_transport_,
|
||||
on_ice_status_change_, user_data_);
|
||||
|
||||
@@ -641,7 +641,7 @@ void PeerConnection::ProcessIceWorkMsg(const IceWorkMsg &msg) {
|
||||
if (ice_transport_list_.end() ==
|
||||
ice_transport_list_.find(remote_user_id)) {
|
||||
// Enable TURN for answer peer by default
|
||||
ice_transport_list_[remote_user_id] = std::make_unique<IceTransport>(
|
||||
ice_transport_list_[remote_user_id] = std::make_shared<IceTransport>(
|
||||
false, transmission_id, user_id_, remote_user_id, ws_transport_,
|
||||
on_ice_status_change_, user_data_);
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class PeerConnection {
|
||||
std::string sdp_without_cands_ = "";
|
||||
|
||||
private:
|
||||
std::map<std::string, std::unique_ptr<IceTransport>> ice_transport_list_;
|
||||
std::map<std::string, std::shared_ptr<IceTransport>> ice_transport_list_;
|
||||
std::map<std::string, bool> is_ice_transport_ready_;
|
||||
|
||||
std::function<void(std::string, const std::string &)> on_ice_status_change_ =
|
||||
|
||||
Reference in New Issue
Block a user