Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1421123003: When all connections timed out on writing, delete them all. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge to head Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index 17d224f98293e9981d6111f08213d2cffca3ad94..5e5ba0156e66de9f527609fbe7b2e4e708a5a32f 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -1112,9 +1112,11 @@ void P2PTransportChannel::HandleNotWritable() {
}
}
+// If all connections timed out, delete them all.
void P2PTransportChannel::HandleAllTimedOut() {
- // Currently we are treating this as channel not writable.
- HandleNotWritable();
+ for (Connection* connection : connections_) {
+ connection->Destroy();
+ }
}
bool P2PTransportChannel::weak() const {
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698