Skip to content

Commit c95e931

Browse files
committed
fix: carry networkAllowlist across manual restartWorker reload
restartWorker respawned the plugin without networkAllowlist, so a manual reload silently stripped all outbound network access until the next full restart. Pass it through; crashCount is still reset for a fresh start.
1 parent 1425d9a commit c95e931

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

core/rpc/worker-manager.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,12 @@ class WorkerManager {
224224
const entry = this.workers.get(pluginId);
225225
if (!entry) return;
226226

227-
const { entryPath, capabilities, pluginName } = entry;
227+
const { entryPath, capabilities, pluginName, networkAllowlist } = entry;
228228
await this.terminateWorker(pluginId);
229-
await this.spawnWorker(pluginId, entryPath, capabilities, pluginName);
229+
// Carry networkAllowlist across a manual reload — otherwise the plugin
230+
// respawns with an empty allowlist and loses all outbound network access.
231+
// crashCount is intentionally NOT carried: a human reload gets a fresh start.
232+
await this.spawnWorker(pluginId, entryPath, capabilities, pluginName, { networkAllowlist });
230233
}
231234

232235
// ── Message Handling ─────────────────────────────────────────────────

0 commit comments

Comments
 (0)