fix WEB页面活动时无法正常停止服务的问题

This commit is contained in:
jxxghp
2024-05-20 11:50:49 +08:00
parent 65975235d4
commit 02c2edc30e
7 changed files with 68 additions and 3 deletions

View File

@ -279,9 +279,11 @@ class Command(metaclass=Singleton):
"""
停止事件处理线程
"""
logger.info("正在停止事件处理...")
self._event.set()
try:
self._thread.join()
logger.info("事件处理停止完成")
except Exception as e:
logger.error(f"停止事件处理线程出错:{str(e)} - {traceback.format_exc()}")