removed pinging of router and localIp

This commit is contained in:
marko 2024-10-05 12:34:47 +02:00
parent 12f28a6623
commit 5916866ebb

View File

@ -21,12 +21,16 @@ func PingLocal255() int {
deviceCount := 0
mu := &sync.Mutex{}
for i := 1; i < 255; i++ {
for i := 2; i < 255; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
addr := fmt.Sprintf("%s.%d", network[:len(network)-2], i)
if addr == localIP.String() {
return
}
if ping(addr) {
mu.Lock()
deviceCount++