Merge branch 'master' of github.com:CopernicaMarketingSoftware/AMQP-CPP
This commit is contained in:
commit
91a23d5737
|
|
@ -14,8 +14,8 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||||
|
|
||||||
# project name
|
# project name
|
||||||
project(amqpcpp)
|
project(amqpcpp)
|
||||||
set (VERSION_MAJOR 3)
|
set (VERSION_MAJOR 4)
|
||||||
set (VERSION_MINOR 2)
|
set (VERSION_MINOR 0)
|
||||||
set (VERSION_PATCH 0)
|
set (VERSION_PATCH 0)
|
||||||
set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||||
|
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -2,8 +2,8 @@ PREFIX ?= /usr
|
||||||
INCLUDE_DIR = ${PREFIX}/include
|
INCLUDE_DIR = ${PREFIX}/include
|
||||||
LIBRARY_DIR = ${PREFIX}/lib
|
LIBRARY_DIR = ${PREFIX}/lib
|
||||||
export LIBRARY_NAME = amqpcpp
|
export LIBRARY_NAME = amqpcpp
|
||||||
export SONAME = 3.2
|
export SONAME = 4.0
|
||||||
export VERSION = 3.2.0
|
export VERSION = 4.0.0
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C src all
|
$(MAKE) -C src all
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ public:
|
||||||
|
|
||||||
// all later deferred objects should report an error, because it
|
// all later deferred objects should report an error, because it
|
||||||
// was not possible to complete the instruction as the channel is
|
// 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);
|
reportError("Channel has been closed", false);
|
||||||
|
|
||||||
// done
|
// done
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,12 @@ private:
|
||||||
*/
|
*/
|
||||||
ev_tstamp _expire;
|
ev_tstamp _expire;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Are heartbeats enabled?
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
bool _enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interval between heartbeats
|
* Interval between heartbeats
|
||||||
* @var uint16_t
|
* @var uint16_t
|
||||||
|
|
@ -216,6 +222,9 @@ private:
|
||||||
*/
|
*/
|
||||||
virtual void onExpired() override
|
virtual void onExpired() override
|
||||||
{
|
{
|
||||||
|
// do nothing if heartbeats are not enabled
|
||||||
|
if (!_enabled) return;
|
||||||
|
|
||||||
// get the current time
|
// get the current time
|
||||||
ev_tstamp now = ev_now(_loop);
|
ev_tstamp now = ev_now(_loop);
|
||||||
|
|
||||||
|
|
@ -313,6 +322,9 @@ private:
|
||||||
*/
|
*/
|
||||||
uint16_t start()
|
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)
|
// expose the interval (the timer is already running, so we do not have to explicitly start it)
|
||||||
return _interval;
|
return _interval;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ bool ConnectionImpl::fail(const Monitor &monitor, const char *message)
|
||||||
while (!_channels.empty())
|
while (!_channels.empty())
|
||||||
{
|
{
|
||||||
// report the errors
|
// report the errors
|
||||||
_channels.begin()->second->reportError(message, false);
|
_channels.begin()->second->reportError(message);
|
||||||
|
|
||||||
// leap out if no longer valid
|
// leap out if no longer valid
|
||||||
if (!monitor.valid()) return false;
|
if (!monitor.valid()) return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue