]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/call.go
Bad exit code if queues are not empty
[nncp.git] / src / call.go
index c4e04cbd9d2a1a47a1e5c5f27a62410b159d0a0c..95a70d6dcc502e03484c2385d8a665dde3b78bf8 100644 (file)
@@ -50,6 +50,7 @@ type Call struct {
        AutoTossNoExec bool
        AutoTossNoTrns bool
        AutoTossNoArea bool
+       AutoTossNoACK  bool
 }
 
 func (ctx *Ctx) CallNode(
@@ -116,7 +117,7 @@ func (ctx *Ctx) CallNode(
                        ctx.LogI("call-started", les, func(les LEs) string {
                                return fmt.Sprintf("Connection to %s (%s)", node.Name, addr)
                        })
-                       state.Wait()
+                       isGood = state.Wait()
                        ctx.LogI("call-finished", append(
                                les,
                                LE{"Duration", int64(state.Duration.Seconds())},
@@ -137,7 +138,6 @@ func (ctx *Ctx) CallNode(
                                        humanize.IBytes(uint64(state.TxSpeed)),
                                )
                        })
-                       isGood = true
                        conn.Close()
                        break
                } else {