Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: webrtc/p2p/base/dtlstransportchannel.cc

Issue 2671903002: Revert of Pick the DTLS handshake timeout based on the ICE RTT estimate (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/fakeicetransport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/fakeicetransport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698