Skip to content

Commit

Permalink
fix: daemon reuse file fd leak (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
aobt authored Apr 9, 2024
1 parent fc53dcf commit 44be646
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/daemon/peer/peertask_reuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func (ptm *peerTaskManager) storePartialFile(ctx context.Context, request *FileT
log.Errorf("open dest file error when reuse peer task: %s", err)
return err
}
defer f.Close()
rc, err := ptm.StorageManager.ReadAllPieces(ctx,
&storage.ReadAllPiecesRequest{PeerTaskMetadata: reuse.PeerTaskMetadata, Range: rg})
if err != nil {
Expand Down

0 comments on commit 44be646

Please sign in to comment.