Merge pull request #8912 from filecoin-project/gstuart/retrieval-no-hang

Fix: cli: Break out of retrieval if provider cancels
This commit is contained in:
Geoff Stuart 2022-06-23 17:15:17 -04:00 committed by GitHub
commit 8b96396ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,6 +194,8 @@ func retrieve(ctx context.Context, cctx *cli.Context, fapi lapi.FullNode, sel *l
break readEvents break readEvents
case retrievalmarket.DealStatusRejected: case retrievalmarket.DealStatusRejected:
return nil, xerrors.Errorf("Retrieval Proposal Rejected: %s", evt.Message) return nil, xerrors.Errorf("Retrieval Proposal Rejected: %s", evt.Message)
case retrievalmarket.DealStatusCancelled:
return nil, xerrors.Errorf("Retrieval Proposal Cancelled: %s", evt.Message)
case case
retrievalmarket.DealStatusDealNotFound, retrievalmarket.DealStatusDealNotFound,
retrievalmarket.DealStatusErrored: retrievalmarket.DealStatusErrored: