Skip to content

Commit 555fcfa

Browse files
committed
fix: skip _unbind_plugin for inactivated plugins in reload()
1 parent 41f8960 commit 555fcfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

astrbot/core/star/star_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ async def reload(self, specified_plugin_name=None):
996996
logger.warning(
997997
f"插件 {smd.name} 未被正常终止: {e!s}, 可能会导致该插件运行不正常。",
998998
)
999-
if smd.name and smd.module_path:
999+
if smd.name and smd.module_path and smd.activated:
10001000
await self._unbind_plugin(smd.name, smd.module_path)
10011001

10021002
star_handlers_registry.clear()
@@ -1013,7 +1013,7 @@ async def reload(self, specified_plugin_name=None):
10131013
logger.warning(
10141014
f"插件 {smd.name} 未被正常终止: {e!s}, 可能会导致该插件运行不正常。",
10151015
)
1016-
if smd.name:
1016+
if smd.name and smd.activated:
10171017
await self._unbind_plugin(smd.name, specified_module_path)
10181018

10191019
result = await self.load(specified_module_path)

0 commit comments

Comments
 (0)