diff options
| author | Alan Conway <aconway@apache.org> | 2007-03-21 02:03:49 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-03-21 02:03:49 +0000 |
| commit | 862b354f6f777314cd4013f5cbd5aaf0003808d7 (patch) | |
| tree | 722127acd578fec6cadc5b7ab0f0d864388342ae /python/qpid/peer.py | |
| parent | ae01787ce90ee7cd1303ce7769328cd242e00f6e (diff) | |
| download | qpid-python-862b354f6f777314cd4013f5cbd5aaf0003808d7.tar.gz | |
* python/qpid/*.py:: apply 0-9 changes missed by merge.
* python/cpp_failing_0-9.txt: update tests to refer to tess_0-9
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@520704 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/peer.py')
| -rw-r--r-- | python/qpid/peer.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/python/qpid/peer.py b/python/qpid/peer.py index 28db20f187..72e6a19bc7 100644 --- a/python/qpid/peer.py +++ b/python/qpid/peer.py @@ -129,6 +129,8 @@ class Peer: content = None self.delegate(channel, Message(channel, frame, content)) + except QueueClosed, e: + self.close(e) except: self.fatal() @@ -156,12 +158,15 @@ class Responder: self.write = writer self.sequence = Sequence(1) - def respond(self, method, request): + def respond(self, method, batch, request): if isinstance(request, Method): self.write(method) else: - # XXX: batching - frame = Response(self.sequence.next(), request.id, 0, method) + # allow batching from frame at either end + if batch<0: + frame = Response(self.sequence.next(), request.id+batch, -batch, method) + else: + frame = Response(self.sequence.next(), request.id, batch, method) self.write(frame) class Closed(Exception): pass @@ -238,8 +243,8 @@ class Channel: def request(self, method, listener, content = None): self.requester.request(method, listener, content) - def respond(self, method, request): - self.responder.respond(method, request) + def respond(self, method, batch, request): + self.responder.respond(method, batch, request) def invoke(self, type, args, kwargs): content = kwargs.pop("content", None) |
