@command{nncp-xfer} проверяет сходится ли контрольная сумма
скопированного локально пакета и исходного.
+@item
+@command{nncp-call} имеет плохой код возврата если в очередях на приём и
+отправку остаются незаконченные задания.
+
@item
Появилась @command{nncp-ack} команда, которая отправляет явное
подтверждение доставки пакета (ACK пакет). Это подтверждение удаляет
@command{nncp-xfer} checks if locally copied packet's checksum differs
from the source's one.
+@item
+@command{nncp-call} has bad return code if its queues contain unfinished jobs.
+
@item
@command{nncp-ack} command appeared, that sends explicit packet receipt
acknowledgement (ACK packet). That acknowledgement deletes referenced
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())},
humanize.IBytes(uint64(state.TxSpeed)),
)
})
- isGood = true
conn.Close()
break
} else {
return nil
}
-func (state *SPState) Wait() {
+func (state *SPState) Wait() bool {
state.wg.Wait()
close(state.payloads)
close(state.pings)
if txDuration > 0 {
state.TxSpeed = state.TxBytes / txDuration
}
+ nothingLeft := len(state.queueTheir) == 0
for _, s := range state.fds {
+ nothingLeft = false
s.fd.Close()
}
for pktName := range state.progressBars {
ProgressKill(pktName)
}
+ return nothingLeft
}
func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) {