mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
fix: Memory leak caused by scanp command due to handler's reference to plugin instance.
close #2412
This commit is contained in:
@@ -151,6 +151,8 @@ class PluginManager:
|
||||
self.disable_plugin(name)
|
||||
failed_plugins.append(name)
|
||||
continue
|
||||
if name in self.instances:
|
||||
self.instances[name].handlers.clear()
|
||||
self.instances[name] = instance
|
||||
for event in instance.handlers:
|
||||
if event not in self.listening_plugins:
|
||||
|
||||
Reference in New Issue
Block a user