Commit 9b5e73d3 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix encoding Protocol object before sending them

parent 9a858e58
......@@ -497,10 +497,10 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
"""
NonBlockingTransport.send(self, raw_data, now)
if isinstance(raw_data, str):
r = self.encode_stanza(raw_data)
else:
if isinstance(raw_data, bytes):
r = raw_data
else:
r = self.encode_stanza(raw_data)
if now:
self.sendqueue.insert(0, r)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment