#245 fixed coordinator missing pocket packets and connection timeouts

This commit is contained in:
Mikayla Fischler 2023-06-03 18:51:59 -04:00
parent 0b939be412
commit 38fc7189ba
3 changed files with 5 additions and 6 deletions

View File

@ -335,12 +335,13 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, range
tick_dmesg_waiting(math.max(0, timeout_s - (util.time_s() - start)))
_send_establish()
clock.start()
elseif event == "timer" then
-- keep checking watchdog timers
apisessions.check_all_watchdogs(p1)
elseif event == "modem_message" then
-- handle message
local packet = public.parse_packet(p1, p2, p3, p4, p5)
if packet ~= nil and packet.type == SCADA_MGMT_TYPE.ESTABLISH then
public.handle_packet(packet)
end
public.handle_packet(packet)
elseif event == "terminate" then
terminated = true
break

View File

@ -117,8 +117,6 @@ function api.new_session(id, in_queue, out_queue, timeout)
-- process packet
if pkt.scada_frame.protocol() == PROTOCOL.COORD_API then
---@cast pkt capi_frame
-- feed watchdog
self.conn_watchdog.feed()
-- handle packet by type
if pkt.type == nil then

View File

@ -20,7 +20,7 @@ local sounder = require("coordinator.sounder")
local apisessions = require("coordinator.session.apisessions")
local COORDINATOR_VERSION = "v0.15.7"
local COORDINATOR_VERSION = "v0.15.8"
local println = util.println
local println_ts = util.println_ts