mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#460 removed coordinator connecting grace period
This commit is contained in:
parent
f734c4307b
commit
cc50e4a020
@ -17,9 +17,6 @@ local FAC_COMMAND = comms.FAC_COMMAND
|
|||||||
|
|
||||||
local SV_Q_DATA = svqtypes.SV_Q_DATA
|
local SV_Q_DATA = svqtypes.SV_Q_DATA
|
||||||
|
|
||||||
-- grace period in seconds for coordinator to finish UI draw to prevent timeout
|
|
||||||
local WATCHDOG_GRACE = 20.0
|
|
||||||
|
|
||||||
-- retry time constants in ms
|
-- retry time constants in ms
|
||||||
-- local INITIAL_WAIT = 1500
|
-- local INITIAL_WAIT = 1500
|
||||||
local RETRY_PERIOD = 1000
|
local RETRY_PERIOD = 1000
|
||||||
@ -360,15 +357,7 @@ function coordinator.new_session(id, s_addr, in_queue, out_queue, timeout, facil
|
|||||||
-- check if a timer matches this session's watchdog
|
-- check if a timer matches this session's watchdog
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
function public.check_wd(timer)
|
function public.check_wd(timer)
|
||||||
local is_wd = self.conn_watchdog.is_timer(timer) and self.connected
|
return self.conn_watchdog.is_timer(timer) and self.connected
|
||||||
|
|
||||||
-- if we are waiting for initial coordinator UI draw, don't close yet
|
|
||||||
if is_wd and (util.time_s() - self.establish_time) <= WATCHDOG_GRACE then
|
|
||||||
self.conn_watchdog.feed()
|
|
||||||
is_wd = false
|
|
||||||
end
|
|
||||||
|
|
||||||
return is_wd
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- close the connection
|
-- close the connection
|
||||||
|
@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor")
|
|||||||
|
|
||||||
local svsessions = require("supervisor.session.svsessions")
|
local svsessions = require("supervisor.session.svsessions")
|
||||||
|
|
||||||
local SUPERVISOR_VERSION = "v1.3.4"
|
local SUPERVISOR_VERSION = "v1.3.5"
|
||||||
|
|
||||||
local println = util.println
|
local println = util.println
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
Loading…
Reference in New Issue
Block a user