diff --git a/Instructs/Instruct.cs b/Instructs/Instruct.cs index bd5997a..c37ec24 100644 --- a/Instructs/Instruct.cs +++ b/Instructs/Instruct.cs @@ -52,6 +52,7 @@ namespace OMS.NET.Instructs "get_presence" => JsonSerializer.Deserialize(root.GetRawText(), options), "get_mapData" => JsonSerializer.Deserialize(root.GetRawText(), options), "get_mapLayer" => JsonSerializer.Deserialize(root.GetRawText(), options), + "ping" => JsonSerializer.Deserialize(root.GetRawText(), options), //广播指令 "broadcast" => classValue switch @@ -61,7 +62,7 @@ namespace OMS.NET.Instructs _ => JsonSerializer.Deserialize(root.GetRawText(), options) }, _ => null - } ?? throw new JsonException("反序列化失败"); + } ?? throw new JsonException($"{typeValue} 反序列化失败"); return instruct; } else diff --git a/MapServer.cs b/MapServer.cs index 2731691..dac8d62 100644 --- a/MapServer.cs +++ b/MapServer.cs @@ -12,7 +12,7 @@ namespace OMS.NET private IPEndPoint iPEndPoint = new(IPAddress.Any, 0); protected override async void OnMessage(MessageEventArgs e) { - GlobalArea.Log.Info(this.ID + " " + this.Context.UserEndPoint.ToString() + ":" + e.Data); + GlobalArea.Log.Debug(this.ID + " " + this.Context.UserEndPoint.ToString() + ":" + e.Data); Instruct? instruct = Instruct.JsonStringParse(e.Data); if (instruct != null) {