diff options
author | mrDoctorWho <mrdoctorwho@gmail.com> | 2013-09-25 11:03:37 +0400 |
---|---|---|
committer | mrDoctorWho <mrdoctorwho@gmail.com> | 2013-09-25 11:03:37 +0400 |
commit | fed5cfb037454953e11e9c16ac3b7e2a3b47f3a7 (patch) | |
tree | db6f0ed64febfe7ee1520676be079f8136d6c8ca /library | |
parent | 5aebda2282bda4bdf2f2468622f1152aebfe402b (diff) |
restart fix
Diffstat (limited to 'library')
-rw-r--r-- | library/xmpp/transports.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/library/xmpp/transports.py b/library/xmpp/transports.py index 5a1ca62..aface07 100644 --- a/library/xmpp/transports.py +++ b/library/xmpp/transports.py @@ -147,9 +147,12 @@ class TCPsocket(PlugIn): raise IOError("Disconnected!") except: received = '' - while self.pending_data(0): - try: received += self._recv(BUFLEN) - except: break + while self.pending_data(): + try: add = self._recv(BUFLEN) + except: add="" + received +=add + if not add: + break if received: # length of 0 means disconnect self._seen_data=1 self.DEBUG(received,'got') |