Skip to content

Commit

Permalink
Add recovery from panic in chainsync.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiger5226 committed Dec 8, 2019
1 parent 344e9b9 commit 94273d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions daemon/jobs/chainsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func ChainSyncAsync() {

func endChainSync() {
chainSyncRunning = false
if r := recover(); r != nil {
logrus.Error("Recovered From: ", r)
}
}

// ChainSync synchronizes the chain data when it does not match lbrycrd. It runs for x duration before it stores state.
Expand Down

0 comments on commit 94273d7

Please sign in to comment.