Nambers / MiraiCP

c++ SDK of Mirai
https://eritque-arcus.tech/MiraiCP/
GNU Affero General Public License v3.0
177 stars 31 forks source link

重载插件后,先前的计时器会被保留 #175

Closed ofbwyx closed 1 year ago

ofbwyx commented 1 year ago

Code of Conduct

问题描述

插件代码代码里的 schedule,在用 reload 重新加载插件后还会继续生效。

日志

No response

版本

2.13.2

组件

不属于上述项或我不知道属于哪一项

编译器

Microsoft Visual C++ (MSVC)

系统

Windows

架构

x86-64/amd64

Antares0982 commented 1 year ago

这是特性,你具体是想要达到什么效果?根据情况你可能需要改你的代码或者详细描述一下你的需求?

ofbwyx @.***> 于 2023年1月31日周二 19:59写道:

Code of Conduct

  • I conform

问题描述

插件代码代码里的 schedule,在用 reload 重新加载插件后还会继续生效。 日志

No response 版本

2.13.2 组件

不属于上述项或我不知道属于哪一项 编译器

Microsoft Visual C++ (MSVC) 系统

Windows 架构

x86-64/amd64

— Reply to this email directly, view it on GitHub https://github.com/Nambers/MiraiCP/issues/175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYUJZQMJ3XJGEUSLSIDHLDWVD5DHANCNFSM6AAAAAAUMK5N7I . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ofbwyx commented 1 year ago

@Antares0982 我在代码里是先 schedule 一次,然后在 TimeOutEvent 里边再 schedule。但是每次 reloadPlugin 时候,之前写的插件的计时还会留着,继续发 TimeOutEvent,要结束进程再开才能没。(不过如果是特性那没事了

Antares0982 commented 1 year ago

明白了,如果是这样的话确实有改善的空间,谢谢反馈!