cheatengine 5.8.25 → 5.8.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ce_mcp_bridge.lua +16 -2
- package/package.json +1 -1
package/ce_mcp_bridge.lua
CHANGED
|
@@ -7621,8 +7621,22 @@ function Pipe.workerLoop()
|
|
|
7621
7621
|
end
|
|
7622
7622
|
end)
|
|
7623
7623
|
Context.lastActivityTime = 0 -- Heartbeat: reset on disconnect
|
|
7624
|
-
Utils.debugPrint("Client disconnected,
|
|
7625
|
-
|
|
7624
|
+
Utils.debugPrint("Client disconnected, recreating pipe for next connection...")
|
|
7625
|
+
|
|
7626
|
+
-- Recreate pipe instance for next client (Windows named pipes are single-client)
|
|
7627
|
+
pcall(function()
|
|
7628
|
+
if Context.pipeServer then
|
|
7629
|
+
Context.pipeServer.destroy()
|
|
7630
|
+
end
|
|
7631
|
+
end)
|
|
7632
|
+
Context.pipeServer = createPipe(Config.PIPE_NAME, Config.PIPE_BUFFER_SIZE, Config.PIPE_BUFFER_SIZE)
|
|
7633
|
+
|
|
7634
|
+
if not Context.pipeServer or not Context.pipeServer.Valid then
|
|
7635
|
+
Utils.debugPrint("Failed to recreate pipe, restarting worker loop...")
|
|
7636
|
+
sleep(100)
|
|
7637
|
+
else
|
|
7638
|
+
Utils.debugPrint("Pipe recreated, ready for next connection")
|
|
7639
|
+
end
|
|
7626
7640
|
end
|
|
7627
7641
|
end
|
|
7628
7642
|
Utils.debugPrint("Worker stopped")
|