#330 close coordinator comms on error exit

This commit is contained in:
Mikayla Fischler 2023-08-25 21:02:24 -04:00
parent d18a93f7d2
commit 8b0a5d529e

View File

@ -22,7 +22,7 @@ local sounder = require("coordinator.sounder")
local apisessions = require("coordinator.session.apisessions") local apisessions = require("coordinator.session.apisessions")
local COORDINATOR_VERSION = "v1.0.5" local COORDINATOR_VERSION = "v1.0.6"
local println = util.println local println = util.println
local println_ts = util.println_ts local println_ts = util.println_ts
@ -394,6 +394,9 @@ local function main()
if link_failed then println_ts("failed to connect to supervisor") end if link_failed then println_ts("failed to connect to supervisor") end
if not ui_ok then println_ts("main UI creation failed") end if not ui_ok then println_ts("main UI creation failed") end
-- close on error exit (such as UI error)
if coord_comms.is_linked() then coord_comms.close() end
println_ts("exited") println_ts("exited")
log.info("exited") log.info("exited")
end end