mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#41 cancel session watchdog timer
This commit is contained in:
parent
76c81395b7
commit
b280201446
@ -81,6 +81,12 @@ function new_watchdog(timeout)
|
|||||||
self._wd_timer = os.startTimer(self._timeout)
|
self._wd_timer = os.startTimer(self._timeout)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local cancel = function ()
|
||||||
|
if self._wd_timer ~= nil then
|
||||||
|
os.cancelTimer(self._wd_timer)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
get_timer = get_timer,
|
get_timer = get_timer,
|
||||||
feed = feed
|
feed = feed
|
||||||
|
@ -365,6 +365,7 @@ function new_session(id, for_reactor, in_queue, out_queue)
|
|||||||
|
|
||||||
-- close the connection
|
-- close the connection
|
||||||
local close = function ()
|
local close = function ()
|
||||||
|
self.plc_conn_watchdod.cancel()
|
||||||
self.connected = false
|
self.connected = false
|
||||||
_send_mgmt(SCADA_MGMT_TYPES.CLOSE, {})
|
_send_mgmt(SCADA_MGMT_TYPES.CLOSE, {})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user