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);