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

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

Issue 2069493002: Do not switch best connection on the controlled side too frequently (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add tests Created 4 years, 6 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 | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index ada3ecfb8bb2deeb6bc5d9120eb1647d7cd1a1da..69d52a2deb362a9f8453a6d91dda0a9a9abecc3d 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -308,11 +308,14 @@ class P2PTransportChannel : public TransportChannelImpl,
std::set<Connection*> pinged_connections_;
std::set<Connection*> unpinged_connections_;
- Connection* best_connection_;
+ Connection* best_connection_ = nullptr;
// Connection selected by the controlling agent. This should be used only
// at controlled side when protocol type is RFC5245.
- Connection* pending_best_connection_;
+ Connection* last_nominated_conn_ = nullptr;
+ // The connection on which the data was received most recently.
+ Connection* last_data_received_conn_ = nullptr;
+
std::vector<RemoteCandidate> remote_candidates_;
bool sort_dirty_; // indicates whether another sort is needed right now
bool had_connection_ = false; // if connections_ has ever been nonempty
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698