change - 心跳之后后增加校时指令,回复心跳后等待500ms下发校时指令

master
wenjy 9 months ago
parent caca29533d
commit afa3115d2a

@ -11,6 +11,7 @@ using System.Data.SqlTypes;
using System.Linq; using System.Linq;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using TouchSocket.Sockets; using TouchSocket.Sockets;
@ -153,8 +154,9 @@ namespace Ems.CollectService.Analysis
if(SendMessageAsync(client, SendMessagePackInfo)) if(SendMessageAsync(client, SendMessagePackInfo))
{ {
logger.Debug($"向客户端:{client.ID};地址:{client.GetIPPort()};回复心跳指令成功"); logger.Debug($"向客户端:{client.ID};地址:{client.GetIPPort()};回复心跳指令成功");
//bool isRes = SendTimeSyncToClient(client, SendMessagePackInfo); Thread.Sleep(500);
//logger.Info($"向客户端:{client.ID};地址:{client.GetIPPort()};发送校时指令{(isRes ? "成功":"失败")}"); bool isRes = SendTimeSyncToClient(client, SendMessagePackInfo);
logger.Info($"向客户端:{client.ID};地址:{client.GetIPPort()};发送校时指令{(isRes ? "":"")}");
return true; return true;
} }
else else

Loading…
Cancel
Save