summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorKen Giusti <kgiusti@apache.org>2014-06-09 21:55:29 +0000
committerKen Giusti <kgiusti@apache.org>2014-06-09 21:55:29 +0000
commit85d3d284addd4abf90850d90133950a712730905 (patch)
tree0f0267066086d07ecf3cc83a2280e0f62730bc33 /qpid/python
parentca9b9a71f0fb1bd85a7b36350373f95f9504b8d2 (diff)
downloadqpid-python-85d3d284addd4abf90850d90133950a712730905.tar.gz
QPID-5808: framer should consume only header bytes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1601513 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/framer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/python/qpid/framer.py b/qpid/python/qpid/framer.py
index 8e4ef014f1..08e172287f 100644
--- a/qpid/python/qpid/framer.py
+++ b/qpid/python/qpid/framer.py
@@ -90,7 +90,9 @@ class Framer(Packer):
def read(self, n):
while len(self.rx_buf) < n:
try:
- s = self.sock.recv(n) # NOTE: instead of "n", arg should be "self.maxbufsize"
+ # QPID-5808: never consume more than n bytes from the socket,
+ # otherwise the extra bytes are discarded.
+ s = self.sock.recv(n - len(self.rx_buf))
if self.security_layer_rx:
try:
s = self.security_layer_rx.decode(s)