Explorar o código

Close DataChannel on remote close

Paul-Louis Ageneau %!s(int64=2) %!d(string=hai) anos
pai
achega
5708f932f5
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/impl/datachannel.cpp

+ 1 - 3
src/impl/datachannel.cpp

@@ -102,9 +102,7 @@ void DataChannel::close() {
 }
 
 void DataChannel::remoteClose() {
-	mIsOpen = false;
-	if (!mIsClosed.exchange(true))
-		triggerClosed();
+	close();
 }
 
 optional<message_variant> DataChannel::receive() {