Skip to content
Permalink
Browse files

don't crash on early shutdown on error

  • Loading branch information...
jabdoa2 committed May 2, 2019
1 parent fbe0bad commit 95ac7c6eb8cd60712fa1c3cad557fcd9ffaa529a
Showing with 3 additions and 2 deletions.
  1. +3 −2 mpf/platforms/p_roc_common.py
@@ -263,8 +263,9 @@ def _poll_events(self):

def stop(self):
"""Stop proc."""
asyncio.run_coroutine_threadsafe(self.proc_process.stop(),
self.proc_process_instance)
if self.proc_process and self.proc_process_instance:
asyncio.run_coroutine_threadsafe(self.proc_process.stop(),
self.proc_process_instance)
if self.proc_thread:
self.debug_log("Waiting for pinproc thread.")
self.proc_thread.join()

0 comments on commit 95ac7c6

Please sign in to comment.
You can’t perform that action at this time.