mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 23:20:43 +00:00
Fix file recv hungup for /sys/power/state
Signed-off-by: zhaolihui <zhaolihui2@huawei.com>
This commit is contained in:
parent
693eb42631
commit
707e3cea02
@ -173,7 +173,7 @@ void HdcFile::TransferSummary(CtxFile *context)
|
|||||||
(context->fileCnt > 1 ? context->transferDirBegin : context->transferBegin);
|
(context->fileCnt > 1 ? context->transferDirBegin : context->transferBegin);
|
||||||
uint64_t fSize = context->fileCnt > 1 ? context->dirSize : context->indexIO;
|
uint64_t fSize = context->fileCnt > 1 ? context->dirSize : context->indexIO;
|
||||||
double fRate = static_cast<double>(fSize) / nMSec; // / /1000 * 1000 = 0
|
double fRate = static_cast<double>(fSize) / nMSec; // / /1000 * 1000 = 0
|
||||||
if (context->indexIO >= context->fileSize) {
|
if (context->indexIO >= context->fileSize || context->lastErrno == 0) {
|
||||||
LogMsg(MSG_OK, "FileTransfer finish, Size:%lld, File count = %d, time:%lldms rate:%.2lfkB/s",
|
LogMsg(MSG_OK, "FileTransfer finish, Size:%lld, File count = %d, time:%lldms rate:%.2lfkB/s",
|
||||||
fSize, context->fileCnt, nMSec, fRate);
|
fSize, context->fileCnt, nMSec, fRate);
|
||||||
} else {
|
} else {
|
||||||
|
@ -233,7 +233,7 @@ void HdcTransferBase::OnFileIO(uv_fs_t *req)
|
|||||||
}
|
}
|
||||||
if (req->result == 0) {
|
if (req->result == 0) {
|
||||||
context->ioFinish = true;
|
context->ioFinish = true;
|
||||||
WRITE_LOG(LOG_INFO, "path:%s fd:%d eof",
|
WRITE_LOG(LOG_DEBUG, "path:%s fd:%d eof",
|
||||||
context->localPath.c_str(), context->fsOpenReq.result);
|
context->localPath.c_str(), context->fsOpenReq.result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user