Browse Source

Merge pull request #653 from paullouisageneau/fix-dc-close-loop

Fix possible close ping-pong with destroyed DataChannel
Paul-Louis Ageneau 3 năm trước cách đây
mục cha
commit
10d23715f0
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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 (!channel) {
+		if (message->type == Message::Control) // ignore control messages like Close
+			return;
+
 		// Invalid, close the DataChannel
 		// Invalid, close the DataChannel
 		PLOG_WARNING << "Got unexpected message on stream " << stream;
 		PLOG_WARNING << "Got unexpected message on stream " << stream;
 		if (auto sctpTransport = getSctpTransport())
 		if (auto sctpTransport = getSctpTransport())