When running following code:
tmr.alarm(0,10000,1,function()
conn=net.createConnection(net.TCP, false)
conn:on("receive", function(conn, pl) print(pl) end)
conn:on("disconnection", function(conn) print("disconnected") end)
conn:connect(80,"121.41.33.127")
conn:send("GET / HTTP/1.1\r\nHost: www.nodemcu.com/\r\n"
.."Connection: keep-alive\r\nAccept: /\r\n\r\n")
end)
no issue: stable
when changing the following lines
conn:connect(8084,"192.168.178.42")
conn:send("GET /json.htm?type=command¶m=udevice&idx=6&nvalue=0&svalue=20.5 HTTP/1.1\r\nHost: nas:8084/\r\n"
.."Connection: keep-alive\r\nAccept: */*\r\n\r\n")
directly a disconnect, while this request from other devices in my local network can access this url.
Is it a bug, or am I doing something wrong?