Commit ebc3d232 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by Felix Lange

eth/downloader: fix mutex regression causing panics on fail (#3591)

parent f087c66f
......@@ -1129,12 +1129,13 @@ func (q *queue) deliverNodeData(results []trie.SyncResult, callback func(int, bo
if err != nil {
q.stateSchedLock.Unlock()
callback(i, progressed, err)
return
}
if err = batch.Write(); err != nil {
q.stateSchedLock.Unlock()
callback(i, progressed, err)
return // TODO(karalabe): If a DB write fails (disk full), we ought to cancel the sync
}
// Item processing succeeded, release the lock (temporarily)
progressed = progressed || prog
q.stateSchedLock.Unlock()
......
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