Fix infinite loop on connection failure

This commit is contained in:
tidwall 2019-11-03 13:29:33 -07:00
parent 813772f2c6
commit 9d2753378e
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ func main() {
fmt.Fprintln(os.Stderr, err.Error()) fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)
} }
if oneCommand != "" {
os.Exit(1)
}
} else if _, err := conn.Do("output " + output); err != nil { } else if _, err := conn.Do("output " + output); err != nil {
fmt.Fprintln(os.Stderr, err.Error()) fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)