Initialize vs by calling VarSum() before looping.

This commit is contained in:
Alan Noble 2018-06-28 14:34:05 +09:30
parent 5ff305e71a
commit 9dd53b58a0
1 changed files with 1 additions and 2 deletions

View File

@ -269,12 +269,11 @@ func run() error {
return err return err
} }
vars, _ := ns.Vars() vars, _ := ns.Vars()
vs := ns.VarSum()
paused := false paused := false
if vars["mode"] == "Paused" { if vars["mode"] == "Paused" {
paused = true paused = true
} }
var vs int
for { for {
if err := send(&ns); err != nil { if err := send(&ns); err != nil {
config.Logger.Log(progName, "Warning", err.Error()) config.Logger.Log(progName, "Warning", err.Error())