diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-10-11 05:11:48 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-10-11 05:11:48 +0000 |
commit | 110b9a660d4e64f507f51c7d9a94d4997f6584f8 (patch) | |
tree | 5da78876c275d9b86590f4ecd6694e9b894af353 /python/qpid/messaging.py | |
parent | 13e6bd9704643993d95c81f22106dae5b59b3084 (diff) | |
download | qpid-python-110b9a660d4e64f507f51c7d9a94d4997f6584f8.tar.gz |
resent linked variable; fixed possible drain failure during reconnect
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@824024 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging.py')
-rw-r--r-- | python/qpid/messaging.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/python/qpid/messaging.py b/python/qpid/messaging.py index 10d9c78396..1d548a3d87 100644 --- a/python/qpid/messaging.py +++ b/python/qpid/messaging.py @@ -646,7 +646,7 @@ class Receiver: self.started = started self.capacity = options.get("capacity", UNLIMITED) self.granted = Serial(0) - self.drain = False + self.draining = False self.impending = Serial(0) self.received = Serial(0) self.returned = Serial(0) @@ -722,11 +722,9 @@ class Receiver: self._ewait(lambda: self.impending >= self.granted) msg = self.session._get(self._pred, timeout=timeout) if msg is None: - self.drain = True - self.granted = self.received + self.draining = True self._wakeup() - self._ewait(lambda: self.impending == self.received) - self.drain = False + self._ewait(lambda: not self.draining) self._grant() self._wakeup() msg = self.session._get(self._pred, timeout=0) |