diff --git a/src/NetscriptWorker.ts b/src/NetscriptWorker.ts index 9e3284d72..16abccc0c 100644 --- a/src/NetscriptWorker.ts +++ b/src/NetscriptWorker.ts @@ -48,6 +48,9 @@ export function prestigeWorkerScripts(): void { ws.env.stopFlag = true; killWorkerScript(ws); } + for (const port of NetscriptPorts) { + port.clear(); + } WorkerScriptStartStopEventEmitter.emit(); workerScripts.clear();