catch terminations that are caught by PPM

This commit is contained in:
Mikayla Fischler
2022-04-18 10:31:24 -04:00
parent 91079eeb78
commit 6a5e0243be
3 changed files with 32 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ os.loadAPI("dev/boiler_rtu.lua")
os.loadAPI("dev/imatrix_rtu.lua")
os.loadAPI("dev/turbine_rtu.lua")
local RTU_VERSION = "alpha-v0.1.4"
local RTU_VERSION = "alpha-v0.1.5"
local print = util.print
local println = util.println
@@ -237,7 +237,10 @@ while true do
-- if linked, stop sending advertisements
linked = link_ref.linked
elseif event == "terminate" then
end
-- check for termination request
if event == "terminate" or ppm.should_terminate() then
log._warning("terminate requested, exiting...")
break
end