Skip to content

Commit

Permalink
Update scan.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Dec 4, 2024
1 parent a7e9eb5 commit ca01c7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wap/pkg/wifi/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func parseLinux(output string) (wifis []Wifi, err error) {
return wifis[i].RSSI > wifis[j].RSSI
})

// Keep only the first 3 records
if len(wifis) > 3 {
wifis = wifis[:3]
}

return wifis, nil
}

Expand Down

0 comments on commit ca01c7c

Please sign in to comment.