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

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

Issue 2018693002: Create a new connection if a candidate reuses an address (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: address comments Created 4 years, 7 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/turnport.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport.cc
diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc
index 31c15fb3dfcbf11f99eff948d22c2dced51d910c..2a0ff35c614b932d1fc0ff9d8c72d4253f95b136 100644
--- a/webrtc/p2p/base/turnport.cc
+++ b/webrtc/p2p/base/turnport.cc
@@ -462,8 +462,7 @@ Connection* TurnPort::CreateConnection(const Candidate& address,
for (size_t index = 0; index < Candidates().size(); ++index) {
if (Candidates()[index].type() == RELAY_PORT_TYPE) {
ProxyConnection* conn = new ProxyConnection(this, index, address);
- conn->SignalDestroyed.connect(this, &TurnPort::OnConnectionDestroyed);
- AddConnection(conn);
+ AddOrReplaceConnection(conn);
return conn;
}
}
@@ -1013,7 +1012,7 @@ void TurnPort::DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp) {
}
}
-void TurnPort::OnConnectionDestroyed(Connection* conn) {
+void TurnPort::HandleConnectionDestroyed(Connection* conn) {
// Schedule an event to destroy TurnEntry for the connection, which is
// already destroyed.
const rtc::SocketAddress& remote_address = conn->remote_candidate().address();
« no previous file with comments | « webrtc/p2p/base/turnport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698