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

Unified Diff: webrtc/base/opensslstreamadapter.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/base/opensslstreamadapter.h ('k') | webrtc/base/sslstreamadapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/opensslstreamadapter.cc
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index 0057ce1bf5bc3a9c0ed62c6516dc7516b63e6b99..83efdc8bc0579493018eb7604ba99fb965e25d1a 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -521,12 +521,6 @@
void OpenSSLStreamAdapter::SetMaxProtocolVersion(SSLProtocolVersion version) {
RTC_DCHECK(ssl_ctx_ == NULL);
ssl_max_version_ = version;
-}
-
-void OpenSSLStreamAdapter::SetInitialRetransmissionTimeout(
- int timeout_ms) {
- RTC_DCHECK(ssl_ctx_ == NULL);
- dtls_handshake_timeout_ms_ = timeout_ms;
}
//
@@ -806,7 +800,11 @@
SSL_set_bio(ssl_, bio, bio); // the SSL object owns the bio now.
if (ssl_mode_ == SSL_MODE_DTLS) {
#ifdef OPENSSL_IS_BORINGSSL
- DTLSv1_set_initial_timeout_duration(ssl_, dtls_handshake_timeout_ms_);
+ // Change the initial retransmission timer from 1 second to 50ms.
+ // This will likely result in some spurious retransmissions, but
+ // it's useful for ensuring a timely handshake when there's packet
+ // loss.
+ DTLSv1_set_initial_timeout_duration(ssl_, 50);
#else
// Enable read-ahead for DTLS so whole packets are read from internal BIO
// before parsing. This is done internally by BoringSSL for DTLS.
« no previous file with comments | « webrtc/base/opensslstreamadapter.h ('k') | webrtc/base/sslstreamadapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698