Browse Source

Fixed SCTP outgoing reset loop on Data Channel close

Paul-Louis Ageneau 3 years ago
parent
commit
c370e8975b
2 changed files with 2 additions and 7 deletions
  1. 2 1
      src/impl/peerconnection.cpp
  2. 0 6
      src/impl/sctptransport.cpp

+ 2 - 1
src/impl/peerconnection.cpp

@@ -430,7 +430,8 @@ void PeerConnection::forwardMessage(message_ptr message) {
 
 			std::unique_lock lock(mDataChannelsMutex); // we are going to emplace
 			mDataChannels.emplace(stream, channel);
-		} else {
+
+		} else if(message->type != Message::Control) {
 			// Invalid, close the DataChannel
 			sctpTransport->closeStream(message->stream);
 			return;

+ 0 - 6
src/impl/sctptransport.cpp

@@ -852,12 +852,6 @@ void SctpTransport::processNotification(const union sctp_notification *notify, s
 			PLOG_VERBOSE << "SCTP reset event, " << desc.str();
 		}
 
-		if (flags & SCTP_STREAM_RESET_OUTGOING_SSN) {
-			for (int i = 0; i < count; ++i) {
-				uint16_t streamId = reset_event.strreset_stream_list[i];
-				closeStream(streamId);
-			}
-		}
 		if (flags & SCTP_STREAM_RESET_INCOMING_SSN) {
 			const byte dataChannelCloseMessage{0x04};
 			for (int i = 0; i < count; ++i) {