From abf2ea94ba877f1930b3a0d2cc547f5a7eb89d61 Mon Sep 17 00:00:00 2001 From: Antti Kauppila Date: Fri, 13 Dec 2019 08:40:59 +0200 Subject: [PATCH] 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 --- components/wifi/esp8266-driver/ESP8266Interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/wifi/esp8266-driver/ESP8266Interface.cpp b/components/wifi/esp8266-driver/ESP8266Interface.cpp index 27c209d552..3aeb82a5b9 100644 --- a/components/wifi/esp8266-driver/ESP8266Interface.cpp +++ b/components/wifi/esp8266-driver/ESP8266Interface.cpp @@ -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),