Fixing leaked reference from SCTP transport to DTLS/ICE transport.
This was causing ICE pings to continue going out on PeerConnections
that use DataChannels, even after closing the PeerConnection.
This CL adds a two-line fix, and an integration test that will catch
this and similar issues.
Bug: webrtc:7655
Change-Id: I589a2a1aaf6433c1d65be69a1267e1b52a33534b
Reviewed-on: https://webrtc-review.googlesource.com/37145
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21488}
diff --git a/rtc_base/virtualsocketserver.cc b/rtc_base/virtualsocketserver.cc
index d461bf1..d8771e7 100644
--- a/rtc_base/virtualsocketserver.cc
+++ b/rtc_base/virtualsocketserver.cc
@@ -834,6 +834,7 @@
int VirtualSocketServer::SendUdp(VirtualSocket* socket,
const char* data, size_t data_size,
const SocketAddress& remote_addr) {
+ ++sent_packets_;
if (sending_blocked_) {
CritScope cs(&socket->crit_);
socket->ready_to_send_ = false;
@@ -897,6 +898,7 @@
}
void VirtualSocketServer::SendTcp(VirtualSocket* socket) {
+ ++sent_packets_;
if (sending_blocked_) {
// Eventually the socket's buffer will fill and VirtualSocket::SendTcp will
// set EWOULDBLOCK.