Browse Source

Close DataChannel on remote close

Paul-Louis Ageneau 2 years ago
parent
commit
5708f932f5
1 changed files with 1 additions and 3 deletions
  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() {