Browse Source

Ignore SCTP failure if media is present

Paul-Louis Ageneau 5 years ago
parent
commit
5bdb1e1015
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/peerconnection.cpp

+ 7 - 0
src/peerconnection.cpp

@@ -380,8 +380,15 @@ shared_ptr<SctpTransport> PeerConnection::initSctpTransport() {
 				    openDataChannels();
 				    break;
 			    case SctpTransport::State::Failed:
+				    LOG_WARNING << "SCTP transport failed";
 				    remoteCloseDataChannels();
+#if RTC_ENABLE_MEDIA
+				    // Ignore SCTP failure if media is present
+				    if (!hasMedia())
+					    changeState(State::Failed);
+#else
 				    changeState(State::Failed);
+#endif
 				    break;
 			    case SctpTransport::State::Disconnected:
 				    remoteCloseDataChannels();