From fed30ad3bff6e22b8b50c987179c18f8eb23e8a2 Mon Sep 17 00:00:00 2001 From: wybzju <552044481@qq.com> Date: Wed, 31 Jul 2019 10:57:51 +0800 Subject: [PATCH] bugfix: the dfget will always receive fail result when change supernode Signed-off-by: wybzju <552044481@qq.com> --- supernode/server/0.3_bridge.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supernode/server/0.3_bridge.go b/supernode/server/0.3_bridge.go index c95dc3e5b..08fa097e4 100644 --- a/supernode/server/0.3_bridge.go +++ b/supernode/server/0.3_bridge.go @@ -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)