Commit f940d777 authored by hannahhoward's avatar hannahhoward

fix(asyncloader): remove send on close channel

remove potential send on close channel -- only happens when context closes anyway
parent 19189966
...@@ -117,11 +117,7 @@ func (al *AsyncLoader) AsyncLoad(requestID graphsync.RequestID, link ipld.Link) ...@@ -117,11 +117,7 @@ func (al *AsyncLoader) AsyncLoad(requestID graphsync.RequestID, link ipld.Link)
resultChan := make(chan types.AsyncLoadResult, 1) resultChan := make(chan types.AsyncLoadResult, 1)
response := make(chan error, 1) response := make(chan error, 1)
lr := loadattemptqueue.NewLoadRequest(requestID, link, resultChan) lr := loadattemptqueue.NewLoadRequest(requestID, link, resultChan)
err := al.sendSyncMessage(&loadRequestMessage{response, requestID, lr}, response) _ = al.sendSyncMessage(&loadRequestMessage{response, requestID, lr}, response)
if err != nil {
resultChan <- types.AsyncLoadResult{Data: nil, Err: err}
close(resultChan)
}
return resultChan return resultChan
} }
......
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