配置区写完后要重启
This commit is contained in:
parent
199c45fa3a
commit
0744ccfbe5
|
@ -201,6 +201,11 @@ void TinyClient::OnWrite(const TinyMessage& msg)
|
|||
dm.Offset -= 64;
|
||||
Array bs(Cfg, Cfg->Length);
|
||||
rt = dm.WriteData(bs, true);
|
||||
|
||||
Cfg->Save();
|
||||
debug_printf("\r\n 配置区被修改,200ms后重启\r\n");
|
||||
Sys.Sleep(200);
|
||||
Sys.Reset();
|
||||
}
|
||||
|
||||
rs.Error = !rt;
|
||||
|
@ -441,7 +446,7 @@ void TinyClient::Ping()
|
|||
TS("TinyClient::Ping");
|
||||
|
||||
ushort off = Cfg->OfflineTime;
|
||||
if(off < 10) off = 10;
|
||||
if(off < 10) off = 30;
|
||||
if(LastActive > 0 && LastActive + off * 1000 < Sys.Ms())
|
||||
{
|
||||
if(Server == 0) return;
|
||||
|
|
Loading…
Reference in New Issue