summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpython/hello-010-world2
-rw-r--r--python/qpid/framer.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/python/hello-010-world b/python/hello-010-world
index 91ebc242c6..1b4c9aed33 100755
--- a/python/hello-010-world
+++ b/python/hello-010-world
@@ -13,7 +13,7 @@ spec = load("../specs/amqp.0-10.xml")
conn = Connection(connect("0.0.0.0", spec.port), spec)
conn.start(timeout=10)
-ssn = conn.session("my-session")
+ssn = conn.session("my-session", timeout=10)
ssn.queue_declare("asdf")
diff --git a/python/qpid/framer.py b/python/qpid/framer.py
index f4ec53dc07..3cc200e3da 100644
--- a/python/qpid/framer.py
+++ b/python/qpid/framer.py
@@ -123,12 +123,18 @@ class Framer(Packer):
track = frame.track & 0x0F
self.pack(Frame.HEADER, frame.flags, frame.type, size, track, frame.channel)
self.write(frame.payload)
+ # XXX: NOT 0-10 FINAL, TEMPORARY WORKAROUND for C++
+ self.write("\xCE")
frm.debug("SENT: %s", frame)
def read_frame(self):
flags, type, size, track, channel = self.unpack(Frame.HEADER)
if flags & 0xF0: raise FramingError()
payload = self.read(size - struct.calcsize(Frame.HEADER))
+ # XXX: NOT 0-10 FINAL, TEMPORARY WORKAROUND for C++
+ end = self.read(1)
+ if end != "\xCE":
+ raise FramingError()
frame = Frame(flags, type, track, channel, payload)
frm.debug("RECV: %s", frame)
return frame