Skip to content

Commit

Permalink
fix: memory leak caused by scanp command due to handler's reference t…
Browse files Browse the repository at this point in the history
…o plugin instance.

close 	zhayujie#2412
  • Loading branch information
ayasa520 committed Dec 3, 2024
1 parent c567641 commit d0db9f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def activate_plugins(self): # 生成新开启的插件实例
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:
Expand Down

0 comments on commit d0db9f0

Please sign in to comment.