qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject qpid-proton git commit: PROTON-843: Java should match C for idle timeout
Date Thu, 02 Apr 2015 18:10:23 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 938f4cb8c -> 0b439c16e


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


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/0b439c16
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/0b439c16
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/0b439c16

Branch: refs/heads/master
Commit: 0b439c16e72560d575bce67e5a4300d1ea89ef52
Parents: 938f4cb
Author: Dominic Evans <dominic.evans@uk.ibm.com>
Authored: Thu Apr 2 18:47:14 2015 +0100
Committer: Dominic Evans <dominic.evans@uk.ibm.com>
Committed: Thu Apr 2 18:47:14 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/0b439c16/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


Mime
View raw message