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

Unified Diff: remoting/signaling/fake_signal_strategy.cc

Issue 1070233004: Fix intermittent connection failure in CRD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: remoting/signaling/fake_signal_strategy.cc
diff --git a/remoting/signaling/fake_signal_strategy.cc b/remoting/signaling/fake_signal_strategy.cc
index da5c0d07318bee36316724775b679d05972efc8f..c2a4b1e52a1746f5279427cab3ebf64d6010e011 100644
--- a/remoting/signaling/fake_signal_strategy.cc
+++ b/remoting/signaling/fake_signal_strategy.cc
@@ -97,7 +97,13 @@ bool FakeSignalStrategy::SendStanza(scoped_ptr<buzz::XmlElement> stanza) {
stanza->SetAttr(buzz::QN_FROM, jid_);
if (!peer_callback_.is_null()) {
- peer_callback_.Run(stanza.Pass());
+ if (send_delay_ != base::TimeDelta()) {
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(peer_callback_, base::Passed(&stanza)),
+ send_delay_);
+ } else {
+ peer_callback_.Run(stanza.Pass());
+ }
return true;
} else {
return false;
« remoting/protocol/libjingle_transport_factory.cc ('K') | « remoting/signaling/fake_signal_strategy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698