|
@@ -23,6 +23,8 @@ end
|
|
|
function stopBroadcastAP()
|
|
function stopBroadcastAP()
|
|
|
wifi.setmode(wifi.STATION)
|
|
wifi.setmode(wifi.STATION)
|
|
|
gpio.write(4, gpio.HIGH)
|
|
gpio.write(4, gpio.HIGH)
|
|
|
|
|
+ srv:close()
|
|
|
|
|
+ srv = nil
|
|
|
SETUP = false
|
|
SETUP = false
|
|
|
end
|
|
end
|
|
|
|
|
|
|
@@ -68,9 +70,9 @@ function updateSettings(payload)
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
function setupServer()
|
|
function setupServer()
|
|
|
- if(srv~=nil) then
|
|
|
|
|
|
|
+ if(srv ~= nil) then
|
|
|
srv:close()
|
|
srv:close()
|
|
|
- srv=nil
|
|
|
|
|
|
|
+ srv = nil
|
|
|
end
|
|
end
|
|
|
srv = net.createServer(net.TCP)
|
|
srv = net.createServer(net.TCP)
|
|
|
srv:listen(80, function(conn)
|
|
srv:listen(80, function(conn)
|