Terminate monitors when nothing to monitor (#577)

This commit is contained in:
Tim Wilkinson 2022-12-22 21:35:01 -08:00 committed by GitHub
parent 7b495f5deb
commit 0992c62755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ function rssi_monitor_10k()
-- ath10k only
local phy = iwinfo.nl80211.phyname(wifiiface)
if not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k") then
if not phy or not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k") then
exit_app()
return
end

View File

@ -48,7 +48,7 @@ function rssi_monitor_9k()
phy = iwinfo.nl80211.phyname(wifiiface)
-- Supports ath9k
if not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath9k") then
if not phy or not nixio.fs.stat("/sys/kernel/debug/ieee80211/" .. phy .. "/ath9k") then
exit_app()
return
end