diff --git a/ws/ws_cobra_publish.cpp b/ws/ws_cobra_publish.cpp index 769f0160..a5ad1dff 100644 --- a/ws/ws_cobra_publish.cpp +++ b/ws/ws_cobra_publish.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -44,9 +43,8 @@ namespace ix // Display incoming messages std::atomic authenticated(false); std::atomic messageAcked(false); - std::condition_variable condition; - conn.setEventCallback([&conn, &channel, &data, &authenticated, &messageAcked, &condition]( + conn.setEventCallback([&conn, &channel, &data, &authenticated, &messageAcked]( ix::CobraConnectionEventType eventType, const std::string& errMsg, const ix::WebSocketHttpHeaders& headers, @@ -83,13 +81,11 @@ namespace ix else if (eventType == ix::CobraConnection_EventType_Error) { spdlog::error("Publisher: error {}", errMsg); - condition.notify_one(); } else if (eventType == ix::CobraConnection_EventType_Published) { spdlog::info("Published message id {} acked", msgId); messageAcked = true; - condition.notify_one(); } });