From fb53845f2aff3ffc2be7c17a9279bba878350dbf Mon Sep 17 00:00:00 2001 From: bbassie <17990055+bbassie@users.noreply.github.com> Date: Thu, 10 Sep 2026 19:47:50 +0000 Subject: [PATCH] Cover opening the UDP socket from the RCON start heuristic Co-Authored-By: Claude Fable 5.1 --- test/host/server.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/host/server.js b/test/host/server.js index c0e65517..1ffa8973 100644 --- a/test/host/server.js +++ b/test/host/server.js @@ -379,6 +379,23 @@ describe("host/server", function() { server.enableLuaUdp = false; } }); + it("should open the socket when RCON starts", async function() { + const startRcon = server._startRcon; + server._startRcon = async () => {}; + server.enableLuaUdp = true; + try { + server._handleOutput(Buffer.from( + " 0.500 Info RemoteCommandProcessor.cpp:133: Starting RCON interface" + ), "stdout"); + while (!server._udpSocket) { + await wait(1); + } + } finally { + server._startRcon = startRcon; + server.enableLuaUdp = false; + } + assert(server.hostUdpPort > 0, "socket was not opened"); + }); it("should not have a host port when not running", function() { assert.equal(server.hostUdpPort, undefined); });