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:
copilot-swe-agent[bot] 2026-03-22 16:46:33 +00:00
parent 37fe626325
commit 64ccdcb39b
2 changed files with 7 additions and 3 deletions

View file

@ -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())