mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
Fix issue with privileged call on linux
This commit is contained in:
parent
fece11540b
commit
dfd2f7943f
@ -85,9 +85,9 @@ func Ping(address string, config *Config) (bool, time.Duration) {
|
|||||||
}
|
}
|
||||||
pinger.Count = 1
|
pinger.Count = 1
|
||||||
pinger.Timeout = config.Timeout
|
pinger.Timeout = config.Timeout
|
||||||
// Set the pinger's privileged mode to true for every operating system except darwin
|
// Set the pinger's privileged mode to true for windows
|
||||||
// https://github.com/TwinProduction/gatus/issues/132
|
// https://github.com/TwinProduction/gatus/issues/132
|
||||||
pinger.SetPrivileged(runtime.GOOS != "darwin")
|
pinger.SetPrivileged(runtime.GOOS == "windows")
|
||||||
err = pinger.Run()
|
err = pinger.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, 0
|
return false, 0
|
||||||
|
Loading…
Reference in New Issue
Block a user