#8 cleaned up closing logic, added connected flags to RTU unit sessions

This commit is contained in:
Mikayla Fischler
2022-05-16 17:13:54 -04:00
parent 136b09d7f2
commit 0eff8a3e6a
6 changed files with 39 additions and 10 deletions

View File

@@ -42,6 +42,7 @@ boiler.new = function (session_id, advert, out_queue)
reactor = advert.reactor,
out_q = out_queue,
transaction_controller = txnctrl.new(),
connected = true,
has_build = false,
periodics = {
next_build_req = 0,
@@ -180,6 +181,9 @@ boiler.new = function (session_id, advert, out_queue)
public.get_reactor = function () return self.reactor end
public.get_db = function () return self.db end
public.close = function () self.connected = false end
public.is_connected = function () return self.connected end
-- update this runner
---@param time_now integer milliseconds
public.update = function (time_now)