summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2015-01-19 14:13:17 +0000
committerGordon Sim <gsim@apache.org>2015-01-19 14:13:17 +0000
commitb086149e61bfd501f316d5ddb43010506da4e78c (patch)
tree655031b565a3163eb75ade4934a057f80e185548 /qpid/cpp/src
parent9ff0e238e286632fe0996779abbf70b72dada252 (diff)
downloadqpid-python-b086149e61bfd501f316d5ddb43010506da4e78c.tar.gz
QPID-6324: fix when default timeout applies
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653009 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index 2d03748ac6..558cad9e54 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -542,11 +542,10 @@ Subscription::Subscription(const Address& address, const std::string& type)
if ((Opt(address)/LINK).hasKey(TIMEOUT)) {
const Variant* timeout = (Opt(address)/LINK/TIMEOUT).value;
if (timeout->asUint32()) queueOptions.setInt("qpid.auto_delete_timeout", timeout->asUint32());
- } else if (durable && !(Opt(address)/LINK/RELIABILITY).value) {
- //if durable but not explicitly reliable, then set a non-zero
- //default for the autodelete timeout (previously this would
- //have defaulted to autodelete immediately anyway, so the risk
- //of the change causing problems is mitigated)
+ } else if (durable && !reliable && !(Opt(address)/LINK/X_DECLARE).hasKey(AUTO_DELETE)) {
+ //if durable but not reliable, and auto-delete not
+ //explicitly set, then set a non-zero default for the
+ //autodelete timeout
queueOptions.setInt("qpid.auto_delete_timeout", 2*60);
}
(Opt(address)/LINK/X_DECLARE/ARGUMENTS).collect(queueOptions);