Fix file recv hungup for /sys/power/state

Signed-off-by: zhaolihui <zhaolihui2@huawei.com>
This commit is contained in:
zhaolihui 2024-08-13 14:22:33 +08:00
parent 693eb42631
commit 707e3cea02
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ void HdcFile::TransferSummary(CtxFile *context)
(context->fileCnt > 1 ? context->transferDirBegin : context->transferBegin);
uint64_t fSize = context->fileCnt > 1 ? context->dirSize : context->indexIO;
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",
fSize, context->fileCnt, nMSec, fRate);
} else {

View File

@ -233,7 +233,7 @@ void HdcTransferBase::OnFileIO(uv_fs_t *req)
}
if (req->result == 0) {
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);
break;
}