No need to continue processing loop if an error ocurred and auto_reconnect=False.
This commit is contained in:
parent
5a6a65fd9f
commit
0c86f8288d
1 changed files with 2 additions and 5 deletions
|
@ -1111,11 +1111,8 @@ class XMLStream(object):
|
||||||
if not self.stop.is_set():
|
if not self.stop.is_set():
|
||||||
log.exception('Connection error.')
|
log.exception('Connection error.')
|
||||||
|
|
||||||
if not self.stop.is_set():
|
if not self.stop.is_set() and self.auto_reconnect:
|
||||||
if self.auto_reconnect:
|
self.reconnect()
|
||||||
self.reconnect()
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
else:
|
else:
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue