diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 6d4e5871f..77049f71d 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -566,6 +566,9 @@ void ApiListener::ApiTimerHandler(void) void ApiListener::RelayMessage(const MessageOrigin::Ptr& origin, const ConfigObject::Ptr& secobj, const Dictionary::Ptr& message, bool log) { + if (!IsActive()) + return; + m_RelayQueue.Enqueue(boost::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log), PriorityNormal, true); }