summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-06-13 12:24:10 +0000
committerRafael H. Schloming <rhs@apache.org>2008-06-13 12:24:10 +0000
commit7a08f4cd427d9e1d0cbf4620fe13eb2ab2990591 (patch)
tree5b85d218020c9995ca744d1860fe297796cce3c0
parent300dcb06b6cb12c42e383687c520fd5c38a53bbf (diff)
downloadqpid-python-7a08f4cd427d9e1d0cbf4620fe13eb2ab2990591.tar.gz
QPID-901: flush after every 64K commands issued
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@667501 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/common/src/main/java/org/apache/qpidity/transport/Session.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/common/src/main/java/org/apache/qpidity/transport/Session.java b/java/common/src/main/java/org/apache/qpidity/transport/Session.java
index 7c6b7daf85..e0bdcf789e 100644
--- a/java/common/src/main/java/org/apache/qpidity/transport/Session.java
+++ b/java/common/src/main/java/org/apache/qpidity/transport/Session.java
@@ -270,6 +270,13 @@ public class Session extends Invoker
{
sync();
}
+
+ // flush every 64K commands to avoid ambiguity on
+ // wraparound
+ if ((next % 65536) == 0)
+ {
+ sessionFlush(COMPLETED);
+ }
}
}
else