@boxcrew/cli 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -620,12 +620,18 @@ function runDaemon(agentName) {
|
|
|
620
620
|
handleChat(msg);
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
|
-
ws.on("close", () => {
|
|
623
|
+
ws.on("close", (code, reason) => {
|
|
624
624
|
sendToServer = null;
|
|
625
625
|
if (activeProcess) {
|
|
626
626
|
activeProcess.kill("SIGTERM");
|
|
627
627
|
activeProcess = null;
|
|
628
628
|
}
|
|
629
|
+
if (code === 4006) {
|
|
630
|
+
console.log(`[${(/* @__PURE__ */ new Date()).toISOString()}] Agent was deleted. Shutting down.`);
|
|
631
|
+
cleanup();
|
|
632
|
+
process.exit(0);
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
629
635
|
if (shouldReconnect) {
|
|
630
636
|
const delay = Math.min(
|
|
631
637
|
RECONNECT_BASE_MS * Math.pow(2, reconnectAttempt),
|