dtls-stun-piggybacking: add missing configuration guard
the lack of this led to a DTLS restart in the default case. Also reduce the log level from "ERROR" to "INFO". BUG=webrtc:367395350 Change-Id: I52cd74f508ca4b4c28b11220ea82d95081558eee Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374503 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43752}
This commit is contained in:
parent
a65c453f9e
commit
3cc17eed68
@ -585,11 +585,12 @@ void DtlsTransport::OnWritableState(rtc::PacketTransportInternal* transport) {
|
||||
// Recreate the DTLS session. Note: this assumes we can consider
|
||||
// the previous DTLS session state beyond repair and no packet
|
||||
// reached the peer.
|
||||
if (dtls_ && !was_ever_connected_ &&
|
||||
if (ice_transport_->config().dtls_handshake_in_stun && dtls_ &&
|
||||
!was_ever_connected_ &&
|
||||
!ice_transport_->IsDtlsPiggybackSupportedByPeer() &&
|
||||
(dtls_state() == webrtc::DtlsTransportState::kConnecting ||
|
||||
dtls_state() == webrtc::DtlsTransportState::kNew)) {
|
||||
RTC_LOG(LS_ERROR) << "DTLS piggybacking not supported, restarting...";
|
||||
RTC_LOG(LS_INFO) << "DTLS piggybacking not supported, restarting...";
|
||||
ice_transport_->SetPiggybackDtlsDataCallback(nullptr);
|
||||
|
||||
dtls_.reset(nullptr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user