Don't send finishing event if there is no error

This commit is contained in:
Ingar Shu 2020-08-17 14:38:50 -07:00
parent 7fbbf23e5a
commit cb71386ed9
No known key found for this signature in database
GPG Key ID: BE3D9CE79F22E769

View File

@ -410,11 +410,9 @@ func (a *API) clientRetrieve(ctx context.Context, order api.RetrievalOrder, ref
defer close(events)
finish := func(e error) {
errStr := ""
if e != nil {
errStr = e.Error()
events <- marketevents.RetrievalEvent{Err: e.Error(), FundsSpent: big.Zero()}
}
events <- marketevents.RetrievalEvent{Err: errStr, FundsSpent: big.Zero()}
}
if order.MinerPeer.ID == "" {