fix(node): ClientRetrieve stops on cancel

When a deal is cancelled, any in progress calls to ClientRetrieve or ClientRetrieveWithEvents should
return
This commit is contained in:
hannahhoward 2021-07-12 14:46:18 -07:00
parent 4433c3cd7c
commit 92ec239202

View File

@ -680,6 +680,8 @@ func readSubscribeEvents(ctx context.Context, dealID retrievalmarket.DealID, sub
return nil return nil
case rm.DealStatusRejected: case rm.DealStatusRejected:
return xerrors.Errorf("Retrieval Proposal Rejected: %s", state.Message) return xerrors.Errorf("Retrieval Proposal Rejected: %s", state.Message)
case rm.DealStatusCancelled:
return xerrors.Errorf("Retrieval was cancelled externally: %s", state.Message)
case case
rm.DealStatusDealNotFound, rm.DealStatusDealNotFound,
rm.DealStatusErrored: rm.DealStatusErrored: