Skip to content

Commit

Permalink
fix(responsemanager): add nil check (#67)
Browse files Browse the repository at this point in the history
add nil check for an empty task (task deleted but not finished removing from peer task queue
  • Loading branch information
hannahhoward authored May 4, 2020
1 parent a8de3a7 commit 9d5f2c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions responsemanager/responsemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ func (rm *ResponseManager) processQueriesWorker() {
case <-rm.ctx.Done():
return
}
if taskData == nil {
log.Info("Empty task on peer request stack")
continue
}
status, err := rm.executeTask(key, taskData)
select {
case rm.messages <- &finishTaskRequest{key, status, err}:
Expand Down

0 comments on commit 9d5f2c2

Please sign in to comment.