mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
fix(LocalRunnerClient): unregister policy listener on close
This commit is contained in:
@@ -176,6 +176,7 @@ public class LocalRunnerClient extends RunnerClient {
|
||||
if (!closed.compareAndSet(false, true)) {
|
||||
return;
|
||||
}
|
||||
mcpConfigWatcher.unregisterPolicyListener();
|
||||
closeQuietly(mcpConfigWatcher);
|
||||
closeQuietly(dynamicActionMcpManager);
|
||||
closeQuietly(mcpDescWatcher);
|
||||
|
||||
@@ -150,4 +150,8 @@ interface RunnerExecutionPolicyListener {
|
||||
fun registerPolicyListener() {
|
||||
ExecutionPolicyRegistry.addListener(this)
|
||||
}
|
||||
|
||||
fun unregisterPolicyListener() {
|
||||
ExecutionPolicyRegistry.removeListener(this)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user