upSendFile_thread_entry 逻辑更新,发送前判断TT状态,避免临时掉线

This commit is contained in:
CSSC-WORK\murmur 2023-09-15 09:32:27 +08:00
parent 76f214d431
commit de1a6633af

View File

@ -469,12 +469,13 @@ static void upSendFile_thread_entry(void *parameter)
{ {
if (!f->index || (var+1) == f->index) if (!f->index || (var+1) == f->index)
{ //index=0 全发或者仅发index { //index=0 全发或者仅发index
if (sendMsg(d[var], s[var]) == RT_EOK) { if (isTTjh() && sendMsg(d[var], s[var]) == RT_EOK) {
LOG_D("send pack[%d] with %d bytes done.",var+1,s[var]); LOG_D("send pack[%d] with %d bytes done.",var+1,s[var]);
} }
else { else {
LOG_E("TT未到位或发送失败");
issendall=0; issendall=0;
break; // break;
} }
rt_thread_mdelay(3000);//发送间隔目前服务器未处理暂设为3s避免粘包 rt_thread_mdelay(3000);//发送间隔目前服务器未处理暂设为3s避免粘包
} }