ixcobra / fix crash in CobraConnection::publishNext when the queue is empty + handle CobraConnection_PublishMode_Batch in CobraMetricsThreadedPublisher
This commit is contained in:
parent
7e1a60e61d
commit
0ee675e554
@ -1 +1 @@
|
||||
6.2.9
|
||||
6.3.0
|
||||
|
@ -1,6 +1,10 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [6.3.0] - 2019-09-28
|
||||
|
||||
- ixcobra / fix crash in CobraConnection::publishNext when the queue is empty + handle CobraConnection_PublishMode_Batch in CobraMetricsThreadedPublisher
|
||||
|
||||
## [6.2.9] - 2019-09-27
|
||||
|
||||
- mbedtls fixes / the unittest now pass on macOS, and hopefully will on Windows/AppVeyor as well.
|
||||
|
@ -233,6 +233,11 @@ namespace ix
|
||||
_publishMode = publishMode;
|
||||
}
|
||||
|
||||
CobraConnectionPublishMode CobraConnection::getPublishMode()
|
||||
{
|
||||
return _publishMode;
|
||||
}
|
||||
|
||||
void CobraConnection::configure(const std::string& appkey,
|
||||
const std::string& endpoint,
|
||||
const std::string& rolename,
|
||||
@ -487,10 +492,11 @@ namespace ix
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_queueMutex);
|
||||
|
||||
if (_messageQueue.empty()) return true;
|
||||
|
||||
auto&& msg = _messageQueue.back();
|
||||
if (!publishMessage(msg))
|
||||
{
|
||||
_messageQueue.push_back(msg);
|
||||
return false;
|
||||
}
|
||||
_messageQueue.pop_back();
|
||||
|
@ -114,6 +114,9 @@ namespace ix
|
||||
/// Set the publish mode
|
||||
void setPublishMode(CobraConnectionPublishMode publishMode);
|
||||
|
||||
/// Query the publish mode
|
||||
CobraConnectionPublishMode getPublishMode();
|
||||
|
||||
/// Lifecycle management. Free resources when backgrounding
|
||||
void suspend();
|
||||
void resume();
|
||||
|
@ -166,7 +166,10 @@ namespace ix
|
||||
|
||||
case MessageKind::Message:
|
||||
{
|
||||
_cobra_connection.publishNext();
|
||||
if (_cobra_connection.getPublishMode() == CobraConnection_PublishMode_Immediate)
|
||||
{
|
||||
_cobra_connection.publishNext();
|
||||
}
|
||||
}; break;
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define IX_WEBSOCKET_VERSION "6.2.9"
|
||||
#define IX_WEBSOCKET_VERSION "6.3.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user