Merge pull request #12098 from ARMmbed/AnttiKauppila-patch-1

Wrong order of code fixed
pull/12132/head
Anna Bridge 2019-12-17 16:26:40 +00:00 committed by GitHub
commit 03e29df0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -637,10 +637,10 @@ int ESP8266Interface::scan(WiFiAccessPoint *res, unsigned count, scan_mode mode,
nsapi_error_t status = _init();
if (status != NSAPI_ERROR_OK) {
return status;
if (_software_conn_stat == IFACE_STATUS_DISCONNECTED) {
_esp.uart_enable_input(false);
}
return status;
}
int ret = _esp.scan(res, count, (mode == SCANMODE_ACTIVE ? ESP8266::SCANMODE_ACTIVE : ESP8266::SCANMODE_PASSIVE),