Fix network/interface monitor

This commit is contained in:
世界
2024-02-26 13:24:19 +08:00
parent 6eed5c6c82
commit 8bafd46fa4
3 changed files with 15 additions and 11 deletions

View File

@@ -1182,6 +1182,10 @@ func (r *Router) updateWIFIState() {
state := r.platformInterface.ReadWIFIState()
if state != r.wifiState {
r.wifiState = state
r.logger.Info("updated WIFI state: SSID=", state.SSID, ", BSSID=", state.BSSID)
if state.SSID == "" && state.BSSID == "" {
r.logger.Info("updated WIFI state: disconnected")
} else {
r.logger.Info("updated WIFI state: SSID=", state.SSID, ", BSSID=", state.BSSID)
}
}
}