disconnect cleanly

This commit is contained in:
Nathan Fritz 2010-10-13 18:21:05 -07:00
parent 7ad7a29a8f
commit a41a4369c6

View file

@ -290,10 +290,10 @@ class XMLStream(object):
self.send_raw(self.stream_footer) self.send_raw(self.stream_footer)
# Wait for confirmation that the stream was # Wait for confirmation that the stream was
# closed in the other direction. # closed in the other direction.
time.sleep(1)
if not reconnect: if not reconnect:
self.auto_reconnect = False self.auto_reconnect = False
self.stop.set() self.stop.set()
time.sleep(1)
try: try:
self.socket.close() self.socket.close()
self.filesocket.close() self.filesocket.close()