Update RTC_LOGs in DtlsTransport to be able to distinguish errors.
There were two different codepaths that could trigger identical LOGs.
b/136184428
Bug: None
Change-Id: I3297c4e957177c3ffdd4c120cfa1b17d250f0a47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155582
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29381}
diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc
index 01cd9f7..3af5fd8 100644
--- a/p2p/base/dtls_transport.cc
+++ b/p2p/base/dtls_transport.cc
@@ -645,13 +645,15 @@
SignalReadPacket(this, buf, read, rtc::TimeMicros(), 0);
} else if (ret == rtc::SR_EOS) {
// Remote peer shut down the association with no error.
- RTC_LOG(LS_INFO) << ToString() << ": DTLS transport closed";
+ RTC_LOG(LS_INFO) << ToString() << ": DTLS transport closed by remote";
set_writable(false);
set_dtls_state(DTLS_TRANSPORT_CLOSED);
} else if (ret == rtc::SR_ERROR) {
// Remote peer shut down the association with an error.
- RTC_LOG(LS_INFO) << ToString()
- << ": DTLS transport error, code=" << read_error;
+ RTC_LOG(LS_INFO)
+ << ToString()
+ << ": Closed by remote with DTLS transport error, code="
+ << read_error;
set_writable(false);
set_dtls_state(DTLS_TRANSPORT_FAILED);
}