Call client.leave on keyboard interrupt

This commit is contained in:
Moishe Lettvin
2024-02-13 14:17:09 -05:00
parent 08144fc560
commit 4fecc10808
2 changed files with 16 additions and 2 deletions

View File

@@ -76,6 +76,9 @@ class BaseTransportService():
except Exception as e:
self._logger.error(f"Exception {e}")
raise e
finally:
# Do anything that must be done to clean up
self._post_run()
self._stop_threads.set()
@@ -87,6 +90,9 @@ class BaseTransportService():
if self._speaker_enabled:
self._receive_audio_thread.join()
def _post_run(self):
pass
def stop(self):
self._stop_threads.set()