From a32fc2ed17f27f675df441bcf121e70ae1f51118 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Mon, 19 Mar 2018 16:58:16 -0400 Subject: [PATCH] Spark-681 Synthetic creat works ok if heartbeats are ticking. --- src/lib/utils/Dispatcher.cpp | 6 ++++-- src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/utils/Dispatcher.cpp b/src/lib/utils/Dispatcher.cpp index f50972c37..25336db57 100755 --- a/src/lib/utils/Dispatcher.cpp +++ b/src/lib/utils/Dispatcher.cpp @@ -269,8 +269,10 @@ DispatcherTimer::~DispatcherTimer() { } void DispatcherTimer::start() { - _me->running = true; - _me->schedule(); + if (!running()) { + _me->running = true; + _me->schedule(); + } } void DispatcherTimer::stop() diff --git a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp index 492e23846..9ec0ede20 100644 --- a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp +++ b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp @@ -115,6 +115,7 @@ struct ExchangeSimApplication::PImpl { }; ExchangeSimApplication::ExchangeSimApplication() : me(new PImpl()) { + me->timer.start(); me->consumer.on_security( [this](api::Security const &s, md::MDConsumerHandle h) { on_new_security(s, h);