!1424 针对异常情况以及加-z,hdc file send/recv 文件会卡住

Merge pull request !1424 from hw-wLiu/master
This commit is contained in:
openharmony_ci 2024-08-29 06:43:41 +00:00 committed by Gitee
commit faf6133663
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -715,7 +715,11 @@ bool HdcTransferBase::CommandDispatch(const uint16_t command, uint8_t *payload,
// Note, I will trigger FileIO after multiple times.
CtxFile *context = &ctxNow;
if (!RecvIOPayload(context, payload, payloadSize)) {
WRITE_LOG(LOG_FATAL, "CommandDispatch RecvIOPayload command:%u", command);
WRITE_LOG(LOG_DEBUG, "RecvIOPayload return false. channelId:%u lastErrno:%u result:%d",
taskInfo->channelId, ctxNow.lastErrno, ctxNow.fsOpenReq.result);
uv_fs_close(nullptr, &ctxNow.fsCloseReq, ctxNow.fsOpenReq.result, nullptr);
HdcTransferBase *thisClass = (HdcTransferBase *)context->thisClass;
thisClass->CommandDispatch(CMD_FILE_FINISH, payload, 1);
ret = false;
break;
}