QPID-6081: [Python Client] 08..091 Ensure that multiframe bodies are received correctly
diff --git a/qpid/peer.py b/qpid/peer.py
index 95055cc..4057178 100644
--- a/qpid/peer.py
+++ b/qpid/peer.py
@@ -357,12 +357,12 @@
for i in range(header.weight):
children.append(read_content(queue))
buf = StringIO()
- eof = header.eof
- while not eof:
+ readbytes = 0
+ while readbytes < header.size:
body = queue.get()
- eof = body.eof
content = body.content
buf.write(content)
+ readbytes += len(content)
return Content(buf.getvalue(), children, header.properties.copy())
class Future: