chore: only start runtime process once on Windows

This commit is contained in:
Junyan Qin
2025-11-09 21:47:20 +08:00
parent 70147fcf5e
commit 8c8702c6c9

View File

@@ -129,6 +129,7 @@ class PluginRuntimeConnector:
# We have to launch runtime via cmd but communicate via ws.
self.ap.logger.info('(windows) use cmd to launch plugin runtime and communicate via ws')
if self.runtime_subprocess_on_windows is None: # only launch once
python_path = sys.executable
env = os.environ.copy()
self.runtime_subprocess_on_windows = await asyncio.create_subprocess_exec(