Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
bugfix: the dfget will always receive fail result when change supernode
Browse files Browse the repository at this point in the history
Signed-off-by: wybzju <[email protected]>
  • Loading branch information
wybzju committed Jul 31, 2019
1 parent 7bfa08f commit 4847085
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions supernode/server/0.3_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ func (s *Server) pullPieceTask(ctx context.Context, rw http.ResponseWriter, req
if !cutil.IsEmptyStr(dstCID) {
dstDfgetTask, err := s.DfgetTaskMgr.Get(ctx, dstCID, taskID)
if err != nil {
return err
logrus.Warnf("failed to get dfget task by dstCID(%s) and taskID(%s), and the srcCID is %s, err: %v",
dstCID, taskID, srcCID, err)
} else {
request.DstPID = dstDfgetTask.PeerID
}
request.DstPID = dstDfgetTask.PeerID
}

isFinished, data, err := s.TaskMgr.GetPieces(ctx, taskID, srcCID, request)
Expand Down

0 comments on commit 4847085

Please sign in to comment.