From fa551f0b4f2bbdd2e7ba071c2cdfad175d022a57 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 9 Nov 2025 00:06:36 -0500 Subject: [PATCH] #638 update info on testing denial and don't send close to unlinked hosts --- pocket/pocket.lua | 16 ++++++++++++---- pocket/ui/apps/alarm.lua | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pocket/pocket.lua b/pocket/pocket.lua index bd4f9f6..73b5161 100644 --- a/pocket/pocket.lua +++ b/pocket/pocket.lua @@ -491,20 +491,28 @@ function pocket.comms(version, nic, sv_watchdog, api_watchdog, nav) function public.close_sv() sv_watchdog.cancel() nav.unload_sv() - self.sv.linked = false + self.sv.r_seq_num = nil self.sv.addr = comms.BROADCAST - _send_sv(MGMT_TYPE.CLOSE, {}) + + if self.sv.linked then + self.sv.linked = false + _send_sv(MGMT_TYPE.CLOSE, {}) + end end -- close connection to coordinator API server function public.close_api() api_watchdog.cancel() nav.unload_api() - self.api.linked = false + self.api.r_seq_num = nil self.api.addr = comms.BROADCAST - _send_crd(MGMT_TYPE.CLOSE, {}) + + if self.api.linked then + self.api.linked = false + _send_crd(MGMT_TYPE.CLOSE, {}) + end end -- close the connections to the servers diff --git a/pocket/ui/apps/alarm.lua b/pocket/ui/apps/alarm.lua index a6dc573..b823a3d 100644 --- a/pocket/ui/apps/alarm.lua +++ b/pocket/ui/apps/alarm.lua @@ -163,7 +163,7 @@ local function new_view(root) TextBox{parent=info_div,x=2,y=1,text="This app provides tools to test alarm sounds by alarm and by tone (1-8)."} TextBox{parent=info_div,x=2,y=6,text="The system must be idle (all units stopped with no alarms active) for testing to run."} - TextBox{parent=info_div,x=2,y=12,text="Currently, testing will be denied unless you have a Facility Authentication Key set (this will change in the future)."} + TextBox{parent=info_div,x=2,y=12,text="Testing will be denied unless you enabled it in the Supervisor's configuration."} --#endregion