CC-5729: Pypo race condition on show source kick event kills playout

* Fixed a race condition in pypo which could kill playout. Input kick
  events and non-file/webstream events could result in an exception
  being thrown. Fixed the logic error behind this, caught the exception
  just in case, and added some code to prevent uncaught pypopush
  exceptions from terminating the thread.
* Could prevent playout breakage in similar situations
This commit is contained in:
Albert Santoni 2014-03-11 18:01:29 -04:00
parent 7660e0cd84
commit 73cbead4c3
2 changed files with 72 additions and 68 deletions

View file

@ -153,8 +153,10 @@ class PypoPush(Thread):
self.telnet_lock.release()
def run(self):
try: self.main()
except Exception, e:
top = traceback.format_exc()
self.logger.error('Pypo Push Exception: %s', top)
while True:
try: self.main()
except Exception, e:
top = traceback.format_exc()
self.logger.error('Pypo Push Exception: %s', top)
time.sleep(5)