From cdb0ae55cbe01da9fce53baf3936cd42d83e3059 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 29 Jul 2017 16:09:42 -0400 Subject: [PATCH] fifosock: dramatically simplify All we really need here is a thin shim around send; stop trying to be clever, it just makes things obfucsated when they go wrong. Chase consequences around the tree. Extensive testing was done looking for memory leaks despite the newfound simplicity, with none found. --- init2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init2.lua b/init2.lua index 5406894..713b69b 100644 --- a/init2.lua +++ b/init2.lua @@ -24,7 +24,7 @@ end tcpserv = net.createServer(net.TCP, 120) tcpserv:listen(23,function(k) local telnetd = dofile "telnetd.lc" - telnetd.on["conn"] = function(k) k:send(string.format("%s [NODE-%06X]",mqttUser,node.chipid())) end + telnetd.on["conn"] = function(k) k(string.format("%s [NODE-%06X]",mqttUser,node.chipid())) end telnetd.server(k) end) -- 2.50.1