mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-08-02 02:18:49 -04:00
fix: temp revert of #207
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user