summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Subscriber.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-07-18 23:51:08 +0200
committerJose <jose@zeroc.com>2019-07-18 23:51:08 +0200
commitfc886b010c01cccb8cca3ac4d92f1ebd7fc72295 (patch)
tree51cf00a4a955efecc9c94527aeafcb25ffbe57b9 /cpp/src/IceStorm/Subscriber.cpp
parentSimplify OutputStream creation (diff)
parentFixed non-thread safe AMD dispatch, fixes #448 (#449) (diff)
downloadice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.tar.bz2
ice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.tar.xz
ice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.zip
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/IceStorm/Subscriber.cpp')
-rw-r--r--cpp/src/IceStorm/Subscriber.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp
index 0fb46848c3d..9df599eec3c 100644
--- a/cpp/src/IceStorm/Subscriber.cpp
+++ b/cpp/src/IceStorm/Subscriber.cpp
@@ -196,12 +196,16 @@ SubscriberBatch::SubscriberBatch(
_obj(obj),
_interval(instance->flushInterval())
{
- assert(retryCount == 0);
}
void
SubscriberBatch::flush()
{
+ if(_state != SubscriberStateOnline || _events.empty())
+ {
+ return;
+ }
+
if(_outstanding == 0)
{
++_outstanding;
@@ -309,7 +313,6 @@ SubscriberOneway::SubscriberOneway(
Subscriber(instance, rec, proxy, retryCount, 5),
_obj(obj)
{
- assert(retryCount == 0);
}
void
@@ -605,18 +608,10 @@ Subscriber::create(
}
else if(newObj->ice_isOneway() || newObj->ice_isDatagram())
{
- if(retryCount > 0)
- {
- throw BadQoS("non-zero retryCount QoS requires a twoway proxy");
- }
subscriber = new SubscriberOneway(instance, rec, proxy, retryCount, newObj);
}
else if(newObj->ice_isBatchOneway() || newObj->ice_isBatchDatagram())
{
- if(retryCount > 0)
- {
- throw BadQoS("non-zero retryCount QoS requires a twoway proxy");
- }
subscriber = new SubscriberBatch(instance, rec, proxy, retryCount, newObj);
}
else //if(newObj->ice_isTwoway())