diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-04-29 18:18:36 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-04-29 18:18:36 +0000 |
| commit | 4e2a112444b34b28b0686b0414536de949e443b0 (patch) | |
| tree | 3be70f5b5de34b4d83417d97e305caaaf8a9ffcc /java/client/src | |
| parent | 487d2c78bd259f5b4b7b023d20961d53324f08b2 (diff) | |
| download | qpid-python-4e2a112444b34b28b0686b0414536de949e443b0.tar.gz | |
This is a fix for QPID-2559
A test case will be checked in shortly.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@939416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index f4b40e06b8..2d421ef03f 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -588,9 +588,11 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic } getQpidSession().messageFlow(consumerTag, MessageCreditUnit.BYTE, 0xFFFFFFFF, Option.UNRELIABLE); - // We need to sync so that we get notify of an error. - // only if not immediate prefetch - if(prefetch() && (isStarted() || _immediatePrefetch)) + + // If the session is suspended credits should not be set as it will also + // set credits when the the session is unsuspended, resulting in too many + // messages than required. + if(prefetch() && !isSuspended() && (isStarted() || _immediatePrefetch)) { // set the flow getQpidSession().messageFlow(consumerTag, |
