cmd/revid-cli: added error checking for sending of logs

This commit is contained in:
Scott 2020-01-20 10:50:02 +10:30
parent b1a7adc487
commit e4315d8203
1 changed files with 5 additions and 2 deletions

View File

@ -311,6 +311,11 @@ func run(cfg config.Config) {
continue continue
} }
err = netLogger.SendLogs(ns)
if err != nil {
log.Log(logger.Warning, pkg+"Logs could not be sent", "error", err.Error())
}
// If var sum hasn't changed we continue. // If var sum hasn't changed we continue.
var vars map[string]string var vars map[string]string
newVs := ns.VarSum() newVs := ns.VarSum()
@ -366,8 +371,6 @@ func run(cfg config.Config) {
ns.SetMode(paused, &vs) ns.SetMode(paused, &vs)
} }
netLogger.SendLogs(ns)
sleep: sleep:
sleepTime, err := strconv.Atoi(ns.Param("mp")) sleepTime, err := strconv.Atoi(ns.Param("mp"))
if err != nil { if err != nil {