From 440d9e497818a7e38fac66260cd11e85931acc1c Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Sun, 9 Jan 2022 13:43:52 +1100 Subject: [PATCH] Clear Netscript ports on augment install / soft reset / bitnode change --- src/NetscriptWorker.ts | 3 +++ 1 file changed, 3 insertions(+) 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();