Fix ordering of stop statements to prevent exception
parent
ef067fe1a4
commit
0b80a25ea7
|
@ -147,13 +147,13 @@ class PreciseRunner:
|
|||
|
||||
def stop(self):
|
||||
"""Stop listening and close stream"""
|
||||
self.engine.stop()
|
||||
|
||||
if self.thread:
|
||||
self.running = False
|
||||
self.thread.join()
|
||||
self.thread = None
|
||||
|
||||
self.engine.stop()
|
||||
|
||||
if self.pa:
|
||||
self.pa.terminate()
|
||||
self.stream.stop_stream()
|
||||
|
|
Loading…
Reference in New Issue