forked from mirrors/statsd_exporter
commit
a373aee28e
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -30,9 +30,9 @@ func serveHTTP() {
|
|||
}
|
||||
|
||||
func udpAddrFromString(addr string) *net.UDPAddr {
|
||||
host, portStr, err := net.SplitHostPort(*statsdListenAddress)
|
||||
host, portStr, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
log.Fatal("Bad StatsD listening address", *statsdListenAddress)
|
||||
log.Fatal("Bad StatsD listening address", addr)
|
||||
}
|
||||
|
||||
if host == "" {
|
||||
|
@ -45,7 +45,7 @@ func udpAddrFromString(addr string) *net.UDPAddr {
|
|||
|
||||
port, err := strconv.Atoi(portStr)
|
||||
if err != nil || port < 0 || port > 65535 {
|
||||
log.Fatal("Bad port %s: %s", portStr, err)
|
||||
log.Fatalf("Bad port %s: %s", portStr, err)
|
||||
}
|
||||
|
||||
return &net.UDPAddr{
|
||||
|
|
Loading…
Reference in a new issue