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 { for {
select { select {
case evt, chOpen := <-updates: case evt, ok := <-updates:
fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n", if ok {
types.SizeStr(types.NewInt(evt.BytesReceived)), fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n",
types.FIL(evt.FundsSpent), types.SizeStr(types.NewInt(evt.BytesReceived)),
retrievalmarket.ClientEvents[evt.Event], types.FIL(evt.FundsSpent),
retrievalmarket.DealStatuses[evt.Status], retrievalmarket.ClientEvents[evt.Event],
) retrievalmarket.DealStatuses[evt.Status],
)
if !chOpen { } else {
fmt.Println("Success") fmt.Println("Success")
return nil return nil
} }