Skip to content

Commit 1c47231

Browse files
committed
CWiFi: add missing return value to disconnect()
1 parent 7e83b8b commit 1c47231

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/WiFi/src/WiFi.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ void CWifi::setHostname(const char* name) {
156156
/* -------------------------------------------------------------------------- */
157157
int CWifi::disconnect() {
158158
/* -------------------------------------------------------------------------- */
159-
CLwipIf::getInstance().disconnectFromAp();
159+
if(CLwipIf::getInstance().disconnectFromAp() == ESP_CONTROL_OK) {
160+
return 1;
161+
}
162+
return 0;
160163
}
161164

162165
/* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)