diff --git a/revid/config.go b/revid/config.go index 93d46c33..52a3eaaa 100644 --- a/revid/config.go +++ b/revid/config.go @@ -316,5 +316,9 @@ func (c *Config) Validate(r *Revid) error { return errors.New("quantisation not unsigned integer or is over threshold") } } + + if c.UdpAddress == "" { + c.UdpAddress = defaultUdpAddr + } return nil } diff --git a/revid/revid.go b/revid/revid.go index e481bf51..3aa66919 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -228,7 +228,7 @@ func (r *Revid) reset(config Config) error { case Http: r.destination = newHttpSender(r.ns, r.config.Logger.Log) case Udp: - s, err := newUdpSender(defaultUdpAddr, r.config.Logger.Log) + s, err := newUdpSender(r.config.UdpAddress, r.config.Logger.Log) if err != nil { return err }