Unverified Commit 9d5f2c26 authored by Hannah Howard's avatar Hannah Howard Committed by GitHub

fix(responsemanager): add nil check (#67)

add nil check for an empty task (task deleted but not finished removing from peer task queue
parent a8de3a70
...@@ -240,6 +240,10 @@ func (rm *ResponseManager) processQueriesWorker() { ...@@ -240,6 +240,10 @@ func (rm *ResponseManager) processQueriesWorker() {
case <-rm.ctx.Done(): case <-rm.ctx.Done():
return return
} }
if taskData == nil {
log.Info("Empty task on peer request stack")
continue
}
status, err := rm.executeTask(key, taskData) status, err := rm.executeTask(key, taskData)
select { select {
case rm.messages <- &finishTaskRequest{key, status, err}: case rm.messages <- &finishTaskRequest{key, status, err}:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment