mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Address code review feedback
- Replace GetAwaiter().GetResult() with synchronous ReadAsStream() - Use JsonNode.DeepClone() instead of serialize/parse round-trip - Extract timeout magic number to named constant Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com> Agent-Logs-Url: https://github.com/milutinke/Minecraft-Console-Client/sessions/afcd1b7b-ea23-4a0d-bb46-a90b623406fc
This commit is contained in:
parent
37fe626325
commit
64ccdcb39b
2 changed files with 7 additions and 3 deletions
|
|
@ -473,7 +473,7 @@ namespace MinecraftClient.Protocol.Message
|
|||
{
|
||||
List<string> using_data = new();
|
||||
if (obj.ContainsKey("using") && !obj.ContainsKey("with"))
|
||||
obj["with"] = System.Text.Json.Nodes.JsonNode.Parse(obj["using"]!.ToJsonString());
|
||||
obj["with"] = obj["using"]!.DeepClone();
|
||||
if (obj.ContainsKey("with"))
|
||||
{
|
||||
foreach (var item in obj["with"]!.AsArray())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue