Skip to content

Commit abf2ea9

Browse files
author
Antti Kauppila
authored
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
1 parent 8fcfbe1 commit abf2ea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ int ESP8266Interface::scan(WiFiAccessPoint *res, unsigned count, scan_mode mode,
637637

638638
nsapi_error_t status = _init();
639639
if (status != NSAPI_ERROR_OK) {
640-
return status;
641640
if (_software_conn_stat == IFACE_STATUS_DISCONNECTED) {
642641
_esp.uart_enable_input(false);
643642
}
643+
return status;
644644
}
645645

646646
int ret = _esp.scan(res, count, (mode == SCANMODE_ACTIVE ? ESP8266::SCANMODE_ACTIVE : ESP8266::SCANMODE_PASSIVE),

0 commit comments

Comments
 (0)