Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ bool ESP8266WiFiGenericClass::mode(WiFiMode_t m) {

bool ret = false;

if (m == WIFI_OFF)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of testing for OFF, should this be testing for !STA && !STA_AP?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!STA && !STA_AP == OFF || AP, so yes it is better.

// calls lwIP's dhcp_stop(),
// safe to call even if not started
wifi_station_dhcpc_stop();

ETS_UART_INTR_DISABLE();
if(_persistent) {
ret = wifi_set_opmode(m);
Expand Down