Added unix socket client timeout
This commit is contained in:
parent
b308150d21
commit
650c74c013
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Usage:
|
// Usage:
|
||||||
@ -106,6 +107,7 @@ func main_status() {
|
|||||||
return net.Dial("unix", statusSocketPath(netName))
|
return net.Dial("unix", statusSocketPath(netName))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Timeout: 8 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
getURL := "http://unix" + statusSocketPath(netName)
|
getURL := "http://unix" + statusSocketPath(netName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user