From: Nathaniel Wesley Filardo Date: Sat, 29 Jul 2017 20:09:42 +0000 (-0400) Subject: fifosock: dramatically simplify X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=cdb0ae55cbe01da9fce53baf3936cd42d83e3059;p=acmetensortoys-esp-lua_lamp 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. --- 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)