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 2017/09/15 16:35:21 UTC

[2/2] qpid-jms git commit: QPIDJMS-322: update tick deadline check to account for the fact it could be negative if the original was or it wrapped

QPIDJMS-322: update tick deadline check to account for the fact it could be negative if the original was or it wrapped


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/9bd02a91
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/9bd02a91
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/9bd02a91

Branch: refs/heads/master
Commit: 9bd02a9155a2d089025139aeaebb8356747596a7
Parents: 2512846
Author: Robbie Gemmell <ro...@apache.org>
Authored: Fri Sep 15 17:26:22 2017 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Fri Sep 15 17:26:22 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9bd02a91/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
index 6a9c924..88deb58 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
@@ -1018,7 +1018,7 @@ public class AmqpProvider implements Provider, TransportListener , AmqpResourceP
         // Using nano time since it is not related to the wall clock, which may change
         long now = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
         long deadline = protonTransport.tick(now);
-        if (deadline > 0) {
+        if (deadline != 0) {
             long delay = deadline - now;
             LOG.trace("IdleTimeoutCheck being initiated, initial delay: {}", delay);
             nextIdleTimeoutCheck = serializer.schedule(new IdleTimeoutCheck(), delay, TimeUnit.MILLISECONDS);
@@ -1415,7 +1415,7 @@ public class AmqpProvider implements Provider, TransportListener , AmqpResourceP
                         fireProviderException(new IOException("Transport closed due to the peer exceeding our requested idle-timeout"));
                     }
                 } else {
-                    if (deadline > 0) {
+                    if (deadline != 0) {
                         long delay = deadline - now;
                         checkScheduled = true;
                         LOG.trace("IdleTimeoutCheck rescheduling with delay: {}", delay);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org