You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/04/24 17:20:43 UTC
[13/25] qpid-proton git commit: PROTON-843: Java should match C for
idle timeout
PROTON-843: Java should match C for idle timeout
As discussed on the mailing list. Currently proton-j advertises a
provided local idle timeout value as-is, whereas proton-c will halve it
before sending it to the remote side. The two implementations should
match in behaviour.
Closes #15
(cherry picked from commit 0b439c16e72560d575bce67e5a4300d1ea89ef52)
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/50ab1436
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/50ab1436
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/50ab1436
Branch: refs/heads/0.9.x
Commit: 50ab143680918f3a812cf529526459ecb6c617f1
Parents: 56101ee
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Thu Apr 2 18:47:14 2015 +0100
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Apr 24 15:42:55 2015 +0100
----------------------------------------------------------------------
.../java/org/apache/qpid/proton/engine/impl/TransportImpl.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/50ab1436/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
index 852489a..b866ca8 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
@@ -798,8 +798,11 @@ public class TransportImpl extends EndpointImpl
if (_channelMax > 0) {
open.setChannelMax(UnsignedShort.valueOf((short) _channelMax));
}
+
+ // as per the recommendation in the spec, advertise half our
+ // actual timeout to the remote
if (_localIdleTimeout > 0) {
- open.setIdleTimeOut(new UnsignedInteger(_localIdleTimeout));
+ open.setIdleTimeOut(new UnsignedInteger(_localIdleTimeout / 2));
}
_isOpenSent = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org