Fix RCON socket lifetime after authentication #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The legacy RCON listener authenticated a connection, then closed its socket before accepting a command. The cleanup block was inside the request loop.
The maintained source now keeps the socket and buffered input stream for the full connection. It reads complete length-prefixed TCP frames, validates lengths and terminators, and sends UTF-8 responses without splitting a character. The shared thread base publishes its running state before starting the thread.
Verified on the rebuilt full dedicated pack under Java 8 in
run/maintenance-check/server, bound to loopback. The server loaded 75 FML containers. Fragmented authentication, two coalesced commands, failed authentication followed by successful authentication, unauthenticated command rejection, invalid length and terminator rejection, normal disconnect/reconnect, save-all, and RCON stop all passed. A 4,109-byte UTF-8 response was returned as valid 4,096-byte and 13-byte payloads and reconstructed without loss; the following command on the same socket passed. The connection reached EOF on shutdown and Gradle exited successfully.Server log:
/tmp/tekkitlite-maintenance-rcon-server.log. No test code added. No player worlds or active integration runs were changed. The legacy import skip list preserves both maintained RCON files. Included in maintenance audit #28.