每次失败,等500ms再重试

This commit is contained in:
Stone 2016-06-23 03:03:51 +00:00
parent 2bc5d3ea15
commit 910b3694f1
1 changed files with 2 additions and 0 deletions

View File

@ -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"))
{