Don't try to output nil channel values

This commit is contained in:
Ingar Shu 2020-08-17 11:17:46 -07:00
parent ff7f0a9dcd
commit 5ace7479ad
No known key found for this signature in database
GPG Key ID: BE3D9CE79F22E769

View File

@ -854,15 +854,15 @@ var clientRetrieveCmd = &cli.Command{
for {
select {
case evt, chOpen := <-updates:
case evt, ok := <-updates:
if ok {
fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n",
types.SizeStr(types.NewInt(evt.BytesReceived)),
types.FIL(evt.FundsSpent),
retrievalmarket.ClientEvents[evt.Event],
retrievalmarket.DealStatuses[evt.Status],
)
if !chOpen {
} else {
fmt.Println("Success")
return nil
}