每次失败,等500ms再重试
This commit is contained in:
parent
2bc5d3ea15
commit
910b3694f1
|
@ -131,6 +131,8 @@ bool EspSocket::SendData(const String& cmd, const Buffer& bs)
|
|||
// 不能等待OK,而应该等待>,因为发送期间可能给别的指令碰撞
|
||||
auto rt = _Host.Send(cmd, ">", "ERROR", 1600);
|
||||
if(rt.Contains(">")) break;
|
||||
|
||||
Sys.Sleep(500);
|
||||
}
|
||||
if(i<3 && _Host.Send(bs.AsString(), "SEND OK", "ERROR", 1600).Contains("SEND OK"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue