remove unused code in ws cobra_publish
This commit is contained in:
parent
c3a619f114
commit
6de426a574
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <condition_variable>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ixcobra/IXCobraMetricsPublisher.h>
|
#include <ixcobra/IXCobraMetricsPublisher.h>
|
||||||
@ -44,9 +43,8 @@ namespace ix
|
|||||||
// Display incoming messages
|
// Display incoming messages
|
||||||
std::atomic<bool> authenticated(false);
|
std::atomic<bool> authenticated(false);
|
||||||
std::atomic<bool> messageAcked(false);
|
std::atomic<bool> messageAcked(false);
|
||||||
std::condition_variable condition;
|
|
||||||
|
|
||||||
conn.setEventCallback([&conn, &channel, &data, &authenticated, &messageAcked, &condition](
|
conn.setEventCallback([&conn, &channel, &data, &authenticated, &messageAcked](
|
||||||
ix::CobraConnectionEventType eventType,
|
ix::CobraConnectionEventType eventType,
|
||||||
const std::string& errMsg,
|
const std::string& errMsg,
|
||||||
const ix::WebSocketHttpHeaders& headers,
|
const ix::WebSocketHttpHeaders& headers,
|
||||||
@ -83,13 +81,11 @@ namespace ix
|
|||||||
else if (eventType == ix::CobraConnection_EventType_Error)
|
else if (eventType == ix::CobraConnection_EventType_Error)
|
||||||
{
|
{
|
||||||
spdlog::error("Publisher: error {}", errMsg);
|
spdlog::error("Publisher: error {}", errMsg);
|
||||||
condition.notify_one();
|
|
||||||
}
|
}
|
||||||
else if (eventType == ix::CobraConnection_EventType_Published)
|
else if (eventType == ix::CobraConnection_EventType_Published)
|
||||||
{
|
{
|
||||||
spdlog::info("Published message id {} acked", msgId);
|
spdlog::info("Published message id {} acked", msgId);
|
||||||
messageAcked = true;
|
messageAcked = true;
|
||||||
condition.notify_one();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user