From d3c69bf94fff19a62eb1f89508957d3e96eae6f6 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Wed, 26 May 2021 19:34:53 -0700
Subject: [PATCH] Abort menu loop when disconnected.

---
 exec/chat_sec.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/chat_sec.js b/exec/chat_sec.js
index 96d606d8ec..e560a02c1a 100644
--- a/exec/chat_sec.js
+++ b/exec/chat_sec.js
@@ -46,7 +46,7 @@ function on_or_off(on)
 
 // Set continue point for main menu commands
 menu:
-while(1) {
+while(bbs.online && !console.aborted) {
 	var str="";
 
 	// Display TEXT\MENU\CHAT.* if not in expert mode
-- 
GitLab