From 2bfee836176510d00e1daed05bda574e5ea70223 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 3 Jun 2017 18:11:21 -0400 Subject: [PATCH] lamp/linux-draw: tmr unregister also stops --- linux-draw.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-draw.lua b/linux-draw.lua index 33251a4..cceffe1 100644 --- a/linux-draw.lua +++ b/linux-draw.lua @@ -48,6 +48,7 @@ function tmr.stop(self) if self.tqe then tq:dequeue(self.tqe); self.tqe = nil end end function tmr.unregister(self) + self:stop() self.fn = nil end function tmr.register(self,period,mode,fn) @@ -77,6 +78,7 @@ cqc:wrap(function() cq.poll({ pollfd = 0, events = 'r' }) local line = io.read() -- XXX :( if line == nil or line == "" then return end + printerr("line: " .. line) dofile("examples/lamp/lamp-remote.lua")(line) end end) -- 2.50.1