Wrong order of code fixed

The source file had dead code because code was behind return and therefore unreachable. Order was changed to have correct behaviour
pull/12098/head
Antti Kauppila 2019-12-13 08:40:59 +02:00 committed by GitHub
parent 8fcfbe117f
commit abf2ea94ba
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),