Skip to content

Commit cbe83d9

Browse files
committed
Fix crashing issues with RSSI
1 parent bade16f commit cbe83d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/WiFi.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ int WiFiClass::init()
259259
_gateway = 0;
260260
_dhcp = 1;
261261
_resolve = 0;
262+
_remoteMacAddress = 0;
262263
memset(_client, 0, sizeof(WiFiClient *) * TCP_SOCK_MAX);
263264

264265
// Initialize IO expander LED control (rev A then rev B)..
@@ -696,7 +697,11 @@ int32_t WiFiClass::RSSI()
696697
m2m_wifi_handle_events(NULL);
697698
}
698699

699-
return _resolve;
700+
int32_t rssi = _resolve;
701+
702+
_resolve = 0;
703+
704+
return rssi;
700705
}
701706

702707
int8_t WiFiClass::scanNetworks()

0 commit comments

Comments
 (0)