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

Unified Diff: webrtc/base/virtualsocketserver.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
« no previous file with comments | « webrtc/base/gunit.h ('k') | webrtc/p2p/base/turnport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/virtualsocketserver.cc
diff --git a/webrtc/base/virtualsocketserver.cc b/webrtc/base/virtualsocketserver.cc
index d871d4c137d4690369d37a3e69b6b0c584fc7bfd..ef3c6e53295e87c690771d9873bb40cf7cd7eb7a 100644
--- a/webrtc/base/virtualsocketserver.cc
+++ b/webrtc/base/virtualsocketserver.cc
@@ -771,8 +771,11 @@ int VirtualSocketServer::Connect(VirtualSocket* socket,
bool VirtualSocketServer::Disconnect(VirtualSocket* socket) {
if (socket) {
+ // If we simulate packets being delayed, we should simulate the
+ // equivalent of a FIN being delayed as well.
+ uint32_t delay = GetRandomTransitDelay();
Taylor Brandstetter 2016/06/24 16:33:40 This is needed for the "TCP release allocation" te
// Remove the mapping.
- msg_queue_->Post(RTC_FROM_HERE, socket, MSG_ID_DISCONNECT);
+ msg_queue_->PostDelayed(RTC_FROM_HERE, delay, socket, MSG_ID_DISCONNECT);
return true;
}
return false;
« no previous file with comments | « webrtc/base/gunit.h ('k') | webrtc/p2p/base/turnport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698