retrieval: Fix deadlock in ClientGetRetrievalUpdates
This commit is contained in:
parent
83f65a673b
commit
78949d6c05
@ -1157,7 +1157,10 @@ func (a *API) ClientGetRetrievalUpdates(ctx context.Context) (<-chan api.Retriev
|
||||
unsub := a.Retrieval.SubscribeToEvents(func(evt rm.ClientEvent, deal rm.ClientDealState) {
|
||||
update := a.newRetrievalInfo(ctx, deal)
|
||||
update.Event = &evt
|
||||
updates <- update
|
||||
select {
|
||||
case updates <- update:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
})
|
||||
|
||||
go func() {
|
||||
|
Loading…
Reference in New Issue
Block a user