Browse Source

Documentation Change - Memory leak (#1358)

Fixes #1303
Tino Hager 8 years ago
parent
commit
0d3e0bbb71
1 changed files with 3 additions and 3 deletions
  1. 3 3
      README.md

+ 3 - 3
README.md

@@ -28,11 +28,11 @@ The NodeMCU programming model is similar to that of [Node.js](https://en.wikiped
 -- a simple HTTP server
 srv = net.createServer(net.TCP)
 srv:listen(80, function(conn)
-	conn:on("receive", function(conn, payload)
+	conn:on("receive", function(sck, payload)
 		print(payload)
-		conn:send("<h1> Hello, NodeMCU.</h1>")
+		sck:send("<h1> Hello, NodeMCU.</h1>")
 	end)
-	conn:on("sent", function(conn) conn:close() end)
+	conn:on("sent", function(sck) sck:close() end)
 end)
 ```
 ```lua