From 91d2b6474d798d1ac50892e1166e4cf8b1e3a652 Mon Sep 17 00:00:00 2001 From: PWZER Date: Wed, 2 Dec 2020 13:31:03 +0800 Subject: [PATCH] Supernode local cdn connet check is not necessary when --cdnPattern=source Signed-off-by: PWZER --- dfget/core/downloader/p2p_downloader/power_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dfget/core/downloader/p2p_downloader/power_client.go b/dfget/core/downloader/p2p_downloader/power_client.go index 17f5a30a3..4d770f9a6 100644 --- a/dfget/core/downloader/p2p_downloader/power_client.go +++ b/dfget/core/downloader/p2p_downloader/power_client.go @@ -119,7 +119,7 @@ func (pc *PowerClient) downloadPiece() (content *pool.Buffer, e error) { peerPort := pc.pieceTask.PeerPort // check that the target download peer is available - if dstIP != "" && dstIP != pc.node { + if dstIP != "" && dstIP != pc.node && pc.pieceTask.Path != pc.cfg.URL { if _, e = httputils.CheckConnect(dstIP, peerPort, -1); e != nil { return nil, e }