From 4eb7eeb40f14ae8026ff4a1f3f74f5d217acabbc Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 25 Nov 2011 01:42:23 +0800 Subject: Send the encoded data (bytes) and not the str, on the socket. --- sleekxmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 30027ece..d9b78129 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -1366,7 +1366,7 @@ class XMLStream(object): try: while sent < total and not self.stop.is_set(): try: - sent += self.socket.send(data[sent:]) + sent += self.socket.send(enc_data[sent:]) count += 1 except ssl.SSLError as serr: if tries >= self.ssl_retry_max: -- cgit v1.2.3