Improved stream reconnection

This commit is contained in:
2015-10-14 17:30:41 -05:00
parent 0f56d8cdd4
commit 792655e299
5 changed files with 17 additions and 13 deletions

View File

@@ -27,7 +27,9 @@ def stream_threaded(func, *args, **kwargs):
try:
func(**k)
except:
pub.sendMessage("streamError", session=a[0])
log.error("Error in stream with args: %r" % (a,))
pub.sendMessage("stream-error", session=a[0])
thread = threading.Thread(target=new_func, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()