From 626e7d3c910998364d8fa492dc7ad77b5b978c66 Mon Sep 17 00:00:00 2001 From: devsaurus Date: Thu, 7 Jan 2016 23:00:24 +0100 Subject: [PATCH] close connection on sent instead on receive --- lua_examples/webap_toggle_pin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua_examples/webap_toggle_pin.lua b/lua_examples/webap_toggle_pin.lua index ddc09d36..d70adcdd 100644 --- a/lua_examples/webap_toggle_pin.lua +++ b/lua_examples/webap_toggle_pin.lua @@ -26,6 +26,6 @@ srv:listen(80,function(conn) end buf = buf.."ONOFF"; client:send(buf); - client:close(); end) + conn:on("sent", function (c) c:close() end) end)