Skip to content

Commit

Permalink
Merge pull request dragonflyoss#752 from wybzju/supernode_bugfix
Browse files Browse the repository at this point in the history
bugfix: the dfget will always receive fail result when change supernode
  • Loading branch information
allencloud authored Aug 1, 2019
2 parents dce28dd + 45c6b67 commit b7cca13
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 b7cca13

Please sign in to comment.