From 3ce4fae82b20f1e72499454dc9dad00014c521d8 Mon Sep 17 00:00:00 2001 From: Alan Noble Date: Sun, 6 May 2018 21:39:44 +0930 Subject: [PATCH] Update NetSender config if reconfig is needed. --- RevidCLI.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RevidCLI.go b/RevidCLI.go index aec18635..8a58198b 100644 --- a/RevidCLI.go +++ b/RevidCLI.go @@ -299,10 +299,11 @@ func periodicNetsenderReport() { } } - //inputs := []string{"X20", "X21"} inputs := netsender.SplitCSV(netsender.GetConfigParam("inputs")) - if _, _, err := netsender.Send(netsender.RequestPoll, inputs); err != nil { - config.Logger.Log("Error", err.Error()) + if _, reconfig, err := netsender.Send(netsender.RequestPoll, inputs); err == nil && reconfig { + if err = netsender.GetConfig(); err != nil { + config.Logger.Log("Error", err.Error()) + } } if cloudVarSum := netsender.GetVarSum(); cloudVarSum != varSum {