Skip to content

Commit 03e29df

Browse files
authored
Merge pull request #12098 from ARMmbed/AnttiKauppila-patch-1
Wrong order of code fixed
2 parents 4c68eae + abf2ea9 commit 03e29df

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)