Remove has_transport check from ReadyToUseRemoteCandidate.

It turns out that this check always returns 'true' and is
also not safe to do from this thread.

Bug: webrtc:12635
Change-Id: Iebc0097042020707678f3a1ad9c912b227a4257c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33626}
This commit is contained in:
Tomas Gunnarsson 2021-04-02 12:33:39 +02:00 committed by Commit Bot
parent b87746b155
commit 45de8b376b

View File

@ -4521,16 +4521,7 @@ bool SdpOfferAnswerHandler::ReadyToUseRemoteCandidate(
return false;
}
bool has_transport = false;
cricket::ChannelInterface* channel = pc_->GetChannel(result.value()->name);
if (channel) {
has_transport = !channel->transport_name().empty();
} else if (data_channel_controller()->data_channel_transport()) {
auto sctp_mid = pc_->sctp_mid();
RTC_DCHECK(sctp_mid);
has_transport = (result.value()->name == *sctp_mid);
}
return has_transport;
return true;
}
RTCErrorOr<const cricket::ContentInfo*> SdpOfferAnswerHandler::FindContentInfo(