DTLS: fail the connection if DTLSv1_handle_timeout returns an error
which signals a permanent connection failure to the application
BUG=webrtc:13999
Change-Id: I7ba25db4aa9035583558a613db97561c48796c76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260100
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36700}
diff --git a/rtc_base/openssl_stream_adapter.cc b/rtc_base/openssl_stream_adapter.cc
index 94b97d7..ee63c70 100644
--- a/rtc_base/openssl_stream_adapter.cc
+++ b/rtc_base/openssl_stream_adapter.cc
@@ -841,6 +841,8 @@
RTC_LOG(LS_INFO) << "DTLS retransmission";
} else if (res < 0) {
RTC_LOG(LS_INFO) << "DTLSv1_handle_timeout() return -1";
+ Error("DTLSv1_handle_timeout", res, -1, true);
+ return webrtc::TimeDelta::PlusInfinity();
}
ContinueSSL();
} else {