Skip to content

Commit a86f2d6

Browse files
committed
Merge pull request marcoskirsch#23 from geekscape/master
Correct check wifi.sta.getip() so that Wi-Fi station connection works.
2 parents e25b9c5 + 90d533b commit a86f2d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ local joinCounter = 0
5757
local joinMaxAttempts = 5
5858
tmr.alarm(0, 3000, 1, function()
5959
local ip = wifi.sta.getip()
60-
if ip and joinCounter < joinMaxAttempts then
60+
if ip == nil and joinCounter < joinMaxAttempts then
6161
print('Connecting to WiFi Access Point ...')
6262
joinCounter = joinCounter +1
6363
else

0 commit comments

Comments
 (0)