Skip to content

Commit c39582a

Browse files
authored
Merge pull request #468 from aliyun/csg/fix/develop/52591682
fix: after exiting the client after fixing the exception, the downloa…
2 parents 57b198c + ae58224 commit c39582a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

node/ossstore/lib/download-job.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,13 @@ DownloadJob.prototype._changeStatus = function (status, retryTimes) {
671671
if (status == "failed" || status == "stopped" || status == "finished") {
672672
self.endTime = new Date().getTime();
673673
//util.closeFD(self.keepFd);
674-
util.closeFD(self.fd); // #50555373 不关闭会导致windows下删除job后,缓冲文件不会删除
675-
console.log("clear speed tid, status:", self.status);
674+
console.log("clear speed tid, status:", self.status, self.fd, self);
675+
try {
676+
util.closeFD(self.fd); // #50555373 不关闭会导致windows下删除job后,缓冲文件不会删除
677+
} catch (e) {
678+
console.error(e);
679+
}
680+
676681
clearInterval(self.speedTid);
677682
self.speed = 0;
678683
//推测耗时

0 commit comments

Comments
 (0)