LOG DTLS (failed) handshake retransmission

Add logging of DTLS handshake retransmission,
either when it happens or when it fails.

Note that is only for the handshake messages,
which are retransmitted with exponential back off.

This patch aim to help rare DTLS hanging problems.

BUG=None

Change-Id: Iae808190711dd80dd8a43ff22757dd69919d63ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222647
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34304}
diff --git a/rtc_base/openssl_stream_adapter.cc b/rtc_base/openssl_stream_adapter.cc
index ab2289b..aa0bc3d 100644
--- a/rtc_base/openssl_stream_adapter.cc
+++ b/rtc_base/openssl_stream_adapter.cc
@@ -834,7 +834,12 @@
         if (flag->alive()) {
           RTC_DLOG(LS_INFO) << "DTLS timeout expired";
           timeout_task_.Stop();
-          DTLSv1_handle_timeout(ssl_);
+          int res = DTLSv1_handle_timeout(ssl_);
+          if (res > 0) {
+            RTC_LOG(LS_INFO) << "DTLS retransmission";
+          } else if (res < 0) {
+            RTC_LOG(LS_INFO) << "DTLSv1_handle_timeout() return -1";
+          }
           ContinueSSL();
         } else {
           RTC_NOTREACHED();