| Index: webrtc/p2p/base/dtlstransportchannel.cc
|
| diff --git a/webrtc/p2p/base/dtlstransportchannel.cc b/webrtc/p2p/base/dtlstransportchannel.cc
|
| index 575ec327b982dbe3c61e3f7a6e98e35a4f6e9a00..476005fd54e17feb0bb77b96a3eaa2175c2aa8b0 100644
|
| --- a/webrtc/p2p/base/dtlstransportchannel.cc
|
| +++ b/webrtc/p2p/base/dtlstransportchannel.cc
|
| @@ -33,11 +33,6 @@
|
| // Maximum number of pending packets in the queue. Packets are read immediately
|
| // after they have been written, so a capacity of "1" is sufficient.
|
| static const size_t kMaxPendingPackets = 1;
|
| -
|
| -// Minimum and maximum values for the initial DTLS handshake timeout. We'll pick
|
| -// an initial timeout based on ICE RTT estimates, but clamp it to this range.
|
| -static const int kMinHandshakeTimeout = 50;
|
| -static const int kMaxHandshakeTimeout = 3000;
|
|
|
| static bool IsDtlsPacket(const char* data, size_t len) {
|
| const uint8_t* u = reinterpret_cast<const uint8_t*>(data);
|
| @@ -608,8 +603,6 @@
|
|
|
| void DtlsTransport::MaybeStartDtls() {
|
| if (dtls_ && ice_transport_->writable()) {
|
| - ConfigureHandshakeTimeout();
|
| -
|
| if (dtls_->StartSSL()) {
|
| // This should never fail:
|
| // Because we are operating in a nonblocking mode and all
|
| @@ -700,24 +693,4 @@
|
| SignalDtlsHandshakeError(error);
|
| }
|
|
|
| -void DtlsTransport::ConfigureHandshakeTimeout() {
|
| - RTC_DCHECK(dtls_);
|
| - rtc::Optional<int> rtt = ice_transport_->GetRttEstimate();
|
| - if (rtt) {
|
| - // Limit the timeout to a reasonable range in case the ICE RTT takes
|
| - // extreme values.
|
| - int initial_timeout = std::max(kMinHandshakeTimeout,
|
| - std::min(kMaxHandshakeTimeout,
|
| - 2 * (*rtt)));
|
| - LOG_J(LS_INFO, this) << "configuring DTLS handshake timeout "
|
| - << initial_timeout << " based on ICE RTT " << *rtt;
|
| -
|
| - dtls_->SetInitialRetransmissionTimeout(initial_timeout);
|
| - } else {
|
| - LOG_J(LS_INFO, this)
|
| - << "no RTT estimate - using default DTLS handshake timeout";
|
| - }
|
| -}
|
| -
|
| -
|
| } // namespace cricket
|
|
|