Merge branch 'master' of github.com:CopernicaMarketingSoftware/AMQP-CPP

This commit is contained in:
Emiel Bruijntjes 2018-11-23 11:16:03 +01:00
commit 91a23d5737
5 changed files with 18 additions and 6 deletions

View File

@ -14,8 +14,8 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
# project name
project(amqpcpp)
set (VERSION_MAJOR 3)
set (VERSION_MINOR 2)
set (VERSION_MAJOR 4)
set (VERSION_MINOR 0)
set (VERSION_PATCH 0)
set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})

View File

@ -2,8 +2,8 @@ PREFIX ?= /usr
INCLUDE_DIR = ${PREFIX}/include
LIBRARY_DIR = ${PREFIX}/lib
export LIBRARY_NAME = amqpcpp
export SONAME = 3.2
export VERSION = 3.2.0
export SONAME = 4.0
export VERSION = 4.0.0
all:
$(MAKE) -C src all

View File

@ -624,7 +624,7 @@ public:
// all later deferred objects should report an error, because it
// was not possible to complete the instruction as the channel is
// now closed
// now closed (but the channel onError does not have to run)
reportError("Channel has been closed", false);
// done

View File

@ -189,6 +189,12 @@ private:
*/
ev_tstamp _expire;
/**
* Are heartbeats enabled?
* @var bool
*/
bool _enabled = false;
/**
* Interval between heartbeats
* @var uint16_t
@ -216,6 +222,9 @@ private:
*/
virtual void onExpired() override
{
// do nothing if heartbeats are not enabled
if (!_enabled) return;
// get the current time
ev_tstamp now = ev_now(_loop);
@ -313,6 +322,9 @@ private:
*/
uint16_t start()
{
// remember that heartbeats are enabled
_enabled = true;
// expose the interval (the timer is already running, so we do not have to explicitly start it)
return _interval;
}

View File

@ -192,7 +192,7 @@ bool ConnectionImpl::fail(const Monitor &monitor, const char *message)
while (!_channels.empty())
{
// report the errors
_channels.begin()->second->reportError(message, false);
_channels.begin()->second->reportError(message);
// leap out if no longer valid
if (!monitor.valid()) return false;