mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Fixed missing data channels mutex lock
This commit is contained in:
@ -667,6 +667,8 @@ void PeerConnection::forwardMessage(message_ptr message) {
|
||||
stream);
|
||||
channel->onOpen(weak_bind(&PeerConnection::triggerDataChannel, this,
|
||||
weak_ptr<DataChannel>{channel}));
|
||||
|
||||
std::unique_lock lock(mDataChannelsMutex); // we are going to emplace
|
||||
mDataChannels.emplace(stream, channel);
|
||||
} else {
|
||||
// Invalid, close the DataChannel
|
||||
|
Reference in New Issue
Block a user