Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 06d5a14

Browse files
yourmoonlightdave.geng
authored andcommitted
bugfix(dfget) fix panic for slice bounds out of range when sendSuccessPiece
Signed-off-by: yourmoonlight <foxkingmoonlight@gmail.com>
1 parent 6304674 commit 06d5a14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dfget/core/downloader/p2p_downloader/client_writer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func sendSuccessPiece(api api.SupernodeAPI, cid string, piece *Piece, cost time.
291291

292292
if cost.Seconds() > 2.0 {
293293
logrus.Infof(
294-
"async writer and report suc from dst:%s... cost:%.3f for range:%s",
295-
piece.DstCid[:25], cost.Seconds(), piece.Range)
294+
"async writer and report suc from dst:%s cost:%.3f for range:%s",
295+
piece.DstCid, cost.Seconds(), piece.Range)
296296
}
297297
}

0 commit comments

Comments
 (0)