fix: acknowledge duplicate commands to prevent sender retries

This commit is contained in:
MayaTheShy
2026-03-29 01:11:31 -04:00
parent 5a83d89509
commit aa5f711fe4

View File

@@ -673,6 +673,14 @@ local function main()
if isCommandDuplicate(message.commandId) then if isCommandDuplicate(message.commandId) then
log.debug("NET", "Duplicate command skipped: %s", tostring(message.commandId)) log.debug("NET", "Duplicate command skipped: %s", tostring(message.commandId))
-- Still ACK so the sender stops retrying
pcall(function()
ctx.networkModem.transmit(replyChannel, cfg.ORDER_CHANNEL, {
type = "command_ack",
commandId = message.commandId,
success = true,
})
end)
else else
recordCommandId(message.commandId) recordCommandId(message.commandId)
cleanupCommandIds() cleanupCommandIds()