fix issue with STA emiting the wrong event

This commit is contained in:
me-no-dev
2018-01-18 13:54:26 +02:00
parent dde5e297c3
commit 8332a235d6
3 changed files with 7 additions and 3 deletions

View File

@ -358,7 +358,7 @@ uint8_t WiFiSTAClass::waitForConnectResult()
return WL_DISCONNECTED;
}
int i = 0;
while(status() >= WL_DISCONNECTED && i++ < 100) {
while((!status() || status() >= WL_DISCONNECTED) && i++ < 100) {
delay(100);
}
return status();