Selaa lähdekoodia

Fixed synchronization in DataChannel::shiftStream()

Paul-Louis Ageneau 4 vuotta sitten
vanhempi
commit
d330738b41
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      src/impl/datachannel.cpp

+ 1 - 0
src/impl/datachannel.cpp

@@ -170,6 +170,7 @@ size_t DataChannel::maxMessageSize() const {
 }
 
 void DataChannel::shiftStream() {
+	std::shared_lock lock(mMutex);
 	if (mStream % 2 == 1)
 		mStream -= 1;
 }