Index: webrtc/p2p/base/stunrequest.cc |
diff --git a/webrtc/p2p/base/stunrequest.cc b/webrtc/p2p/base/stunrequest.cc |
index 0a0b1a8997291d5d3c2c84ea191f8e6c812c355b..3864a76d87d91f50d8002cb08a6c60b92021e984 100644 |
--- a/webrtc/p2p/base/stunrequest.cc |
+++ b/webrtc/p2p/base/stunrequest.cc |
@@ -53,11 +53,13 @@ void StunRequestManager::SendDelayed(StunRequest* request, int delay) { |
} |
} |
-void StunRequestManager::Flush() { |
+void StunRequestManager::Flush(int msg_type) { |
for (const auto kv : requests_) { |
StunRequest* request = kv.second; |
- thread_->Clear(request, MSG_STUN_SEND); |
- thread_->Send(request, MSG_STUN_SEND, NULL); |
+ if (msg_type == 0 || msg_type == request->type()) { |
+ thread_->Clear(request, MSG_STUN_SEND); |
+ thread_->Send(request, MSG_STUN_SEND, NULL); |
+ } |
} |
} |