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}
This commit is contained in:
Jonas Oreland
2021-06-16 13:42:20 +02:00
committed by WebRTC LUCI CQ
parent d579e6bc7b
commit 808f49428f

View File

@ -834,7 +834,12 @@ void OpenSSLStreamAdapter::SetTimeout(int delay_ms) {
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();