Don't try to output nil channel values
This commit is contained in:
parent
ff7f0a9dcd
commit
5ace7479ad
@ -854,15 +854,15 @@ var clientRetrieveCmd = &cli.Command{
|
|||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case evt, chOpen := <-updates:
|
case evt, ok := <-updates:
|
||||||
|
if ok {
|
||||||
fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n",
|
fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n",
|
||||||
types.SizeStr(types.NewInt(evt.BytesReceived)),
|
types.SizeStr(types.NewInt(evt.BytesReceived)),
|
||||||
types.FIL(evt.FundsSpent),
|
types.FIL(evt.FundsSpent),
|
||||||
retrievalmarket.ClientEvents[evt.Event],
|
retrievalmarket.ClientEvents[evt.Event],
|
||||||
retrievalmarket.DealStatuses[evt.Status],
|
retrievalmarket.DealStatuses[evt.Status],
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
if !chOpen {
|
|
||||||
fmt.Println("Success")
|
fmt.Println("Success")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user