Skip to content

Commit

Permalink
fix: wait available peer packet panic (#561)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Ma <majinjing3@gmail.com>
  • Loading branch information
jim3ma committed Aug 18, 2021
1 parent d74f830 commit 8380b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/daemon/peer/peertask_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,12 @@ loop:
})

if err != nil {
pt.Warnf("get piece task error: %s, wait available peers from scheduler", err)
pt.Warnf("get piece task error: %s, wait available peers from scheduler", err.Error())
pt.span.RecordError(err)
if num, ok = pt.waitAvailablePeerPacket(); !ok {
break loop
}
continue loop
}

if !initialized {
Expand Down

0 comments on commit 8380b21

Please sign in to comment.