Explorar el Código

Fixed synchronization in DataChannel::shiftStream()

Paul-Louis Ageneau hace 4 años
padre
commit
d330738b41
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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;
 }