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

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

Issue 2097793003: Using fake clock for TURN port tests and un-disabling some tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Revising comments. 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
« webrtc/base/virtualsocketserver.cc ('K') | « webrtc/p2p/base/turnport_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnserver.cc
diff --git a/webrtc/p2p/base/turnserver.cc b/webrtc/p2p/base/turnserver.cc
index 0b06c44ab0df35c26e15aa0ff0b10db02dd8f21e..b4510e637fa6c9273342eda4966052fbaf7a5d15 100644
--- a/webrtc/p2p/base/turnserver.cc
+++ b/webrtc/p2p/base/turnserver.cc
@@ -509,10 +509,11 @@ void TurnServer::OnAllocationDestroyed(TurnServerAllocation* allocation) {
// Removing the internal socket if the connection is not udp.
rtc::AsyncPacketSocket* socket = allocation->conn()->socket();
InternalSocketMap::iterator iter = server_sockets_.find(socket);
- ASSERT(iter != server_sockets_.end());
// Skip if the socket serving this allocation is UDP, as this will be shared
// by all allocations.
- if (iter->second != cricket::PROTO_UDP) {
+ // Note: We may not find a socket if it's a TCP socket that was closed, and
+ // the allocation is only now timing out.
+ if (iter != server_sockets_.end() && iter->second != cricket::PROTO_UDP) {
DestroyInternalSocket(socket);
}
« webrtc/base/virtualsocketserver.cc ('K') | « webrtc/p2p/base/turnport_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698