fix: temp revert of #207

This commit is contained in:
seriousm4x
2023-09-11 00:52:28 +02:00
parent cce6823f25
commit 8299f22dfd

View File

@@ -2,7 +2,6 @@ package networking
import (
"net"
"runtime"
"time"
"github.com/pocketbase/pocketbase/models"
@@ -18,13 +17,7 @@ func PingDevice(device *models.Record) bool {
}
pinger.Count = 1
pinger.Timeout = 500 * time.Millisecond
// windows needs privileged permissions.
// If you have issues on linux, see here: https://github.com/prometheus-community/pro-bing#linux
if runtime.GOOS == "windows" {
pinger.SetPrivileged(true)
}
pinger.SetPrivileged(true)
err = pinger.Run()
if err != nil {
logger.Error.Println(err)