diff --git a/cmd/rv/main.go b/cmd/rv/main.go index 2758221f..e9b006eb 100644 --- a/cmd/rv/main.go +++ b/cmd/rv/main.go @@ -118,6 +118,11 @@ func main() { log.Log(logger.Fatal, pkg+"could not initialise netsender client: "+err.Error()) } + rv, err = revid.New(config.Config{Logger: log}, ns) + if err != nil { + log.Log(logger.Fatal, pkg+"could not initialise revid", "error", err.Error()) + } + run(rv, ns, log, netLog) } @@ -153,16 +158,6 @@ func run(rv *revid.Revid, ns *netsender.Sender, l *logger.Logger, nl *netlogger. continue } - // If first time running loop, i.e. rv == nil, then we create a new Revid. - if rv == nil { - rv, err = revid.New(config.Config{Logger: l}, ns) - if err != nil { - l.Log(logger.Warning, pkg+"could not initialise revid", "error", err.Error()) - sleep(ns, l) - continue - } - } - // Configure revid based on the vars. err = rv.Update(vars) if err != nil {