Skip to content

Items lost on send error in edgeTransferSendMessage — no rollback #14

@ILLISIS

Description

@ILLISIS

Bug

In instance.ts, edgeTransferSendMessage catches send errors and rethrows them, but never returns the transferred items to the source. A // TODO return items comment in the code confirms this is a known incomplete implementation.

Code

// instance.ts:476-480
// We assume the transfer did not happen if an error occured.
} catch (err) {
    throw err;
    // TODO return items
}

Impact

If sendTo throws (e.g. the partner instance is offline, network timeout, or message rejected), the items/fluids/power that were deducted from the source side are never returned. The resources are permanently lost with no recovery mechanism.

Expected behaviour

On a send failure, the transferred resources should be returned to the source instance so the game can re-attempt the transfer on the next tick. At minimum, the failure should be logged with enough detail (edge ID, transfer contents) to allow manual recovery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions