mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
fix: 重载启动新的bot线程导致原线程中止
This commit is contained in:
5
main.py
5
main.py
@@ -77,8 +77,9 @@ def main(first_time_init=False):
|
||||
timeout=config.process_message_timeout, retry=config.retry_times,
|
||||
first_time_init=first_time_init)
|
||||
|
||||
qq_bot_thread = threading.Thread(target=qqbot.bot.run, args=(), daemon=True)
|
||||
qq_bot_thread.start()
|
||||
if first_time_init: # 不是热重载之后的启动,则不启动新的bot线程
|
||||
qq_bot_thread = threading.Thread(target=qqbot.bot.run, args=(), daemon=True)
|
||||
qq_bot_thread.start()
|
||||
|
||||
logging.info('程序启动完成')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user