Sfoglia il codice sorgente

Do not reset stream on unexpected DataChannel control message

Paul-Louis Ageneau 3 anni fa
parent
commit
8bcebf42bb
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/impl/peerconnection.cpp

+ 3 - 0
src/impl/peerconnection.cpp

@@ -455,6 +455,9 @@ void PeerConnection::forwardMessage(message_ptr message) {
 	}
 
 	if (!channel) {
+		if (message->type == Message::Control) // ignore control messages like Close
+			return;
+
 		// Invalid, close the DataChannel
 		PLOG_WARNING << "Got unexpected message on stream " << stream;
 		if (auto sctpTransport = getSctpTransport())