Check that the session is still alive before sending data.
Fixes issue #168
This commit is contained in:
parent
2858dbf57f
commit
387ef513d6
1 changed files with 2 additions and 1 deletions
|
@ -1612,7 +1612,8 @@ class XMLStream(object):
|
|||
tries = 0
|
||||
try:
|
||||
with self.send_lock:
|
||||
while sent < total and not self.stop.is_set():
|
||||
while sent < total and not self.stop.is_set() and
|
||||
self.session_started_event.is_set():
|
||||
try:
|
||||
sent += self.socket.send(enc_data[sent:])
|
||||
count += 1
|
||||
|
|
Loading…
Reference in a new issue