diff --git a/test/IXCobraChatTest.cpp b/test/IXCobraChatTest.cpp index 5189940e..a35f3605 100644 --- a/test/IXCobraChatTest.cpp +++ b/test/IXCobraChatTest.cpp @@ -78,11 +78,11 @@ namespace SatoriChat::SatoriChat(const std::string& user, const std::string& session, const std::string& endpoint) : - _connectedAndSubscribed(false), - _stop(false), _user(user), _session(session), - _endpoint(endpoint) + _endpoint(endpoint), + _stop(false), + _connectedAndSubscribed(false) { } @@ -197,7 +197,7 @@ namespace [this, channel] (ix::CobraConnectionEventType eventType, const std::string& errMsg, - const ix::WebSocketHttpHeaders& headers, + const ix::WebSocketHttpHeaders& /*headers*/, const std::string& subscriptionId, CobraConnection::MsgId msgId) { @@ -262,11 +262,11 @@ namespace _conn.disconnect(); _conn.setEventCallback([] - (ix::CobraConnectionEventType eventType, - const std::string& errMsg, - const ix::WebSocketHttpHeaders& headers, - const std::string& subscriptionId, - CobraConnection::MsgId msgId) + (ix::CobraConnectionEventType /*eventType*/, + const std::string& /*errMsg*/, + const ix::WebSocketHttpHeaders& /*headers*/, + const std::string& /*subscriptionId*/, + CobraConnection::MsgId /*msgId*/) { ; }); diff --git a/test/IXCobraMetricsPublisherTest.cpp b/test/IXCobraMetricsPublisherTest.cpp index e58337db..96c1b3db 100644 --- a/test/IXCobraMetricsPublisherTest.cpp +++ b/test/IXCobraMetricsPublisherTest.cpp @@ -29,7 +29,7 @@ namespace std::atomic gStop; std::atomic gSubscriberConnectedAndSubscribed; - std::atomic gUniqueMessageIdsCount; + std::atomic gUniqueMessageIdsCount; std::atomic gMessageCount; std::set gIds; @@ -53,7 +53,7 @@ namespace [&conn] (ix::CobraConnectionEventType eventType, const std::string& errMsg, - const ix::WebSocketHttpHeaders& headers, + const ix::WebSocketHttpHeaders& /*headers*/, const std::string& subscriptionId, CobraConnection::MsgId msgId) { @@ -61,6 +61,10 @@ namespace { Logger() << "Subscriber connected:"; } + if (eventType == ix::CobraConnection_EventType_Error) + { + Logger() << "Subscriber error:" << errMsg; + } else if (eventType == ix::CobraConnection_EventType_Authenticated) { log("Subscriber authenticated"); diff --git a/test/IXWebSocketCloseTest.cpp b/test/IXWebSocketCloseTest.cpp index 22a37a73..5bc41444 100644 --- a/test/IXWebSocketCloseTest.cpp +++ b/test/IXWebSocketCloseTest.cpp @@ -178,11 +178,11 @@ namespace { // A dev/null server server.setOnConnectionCallback( - [&server, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](std::shared_ptr webSocket, + [&receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](std::shared_ptr webSocket, std::shared_ptr connectionState) { webSocket->setOnMessageCallback( - [webSocket, connectionState, &server, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](const ix::WebSocketMessagePtr& msg) + [webSocket, connectionState, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](const ix::WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Open) {