Skip to content

map/world: SessionEndConfirm hardcodes error_code=1 — world-server logs "error ending session" on every disconnect and skips confirm-side cleanup #196

Description

@swstegall

Symptom

world-server logs ERROR error ending session session=N on every disconnect (live logs 2026-07-04, 7/7 disconnects).

Mechanism

The error is self-inflicted: map-server's session-end reply hardcodes the error code to 1 —

map-server/src/processor.rs:630:

let reply = tx::build_session_end(session_id, 1, 0);

world-server's confirm handler sees error != 0, takes its error branch, and skips confirm-side cleanup — which also leaves the cross-zone handoff protocol dead on that path. A proper builder already exists: build_session_end_confirm (map-server/src/packets/send/world_packets.rs:49) with error 0 for the success case.

Impact

  • Permanent log noise that masks real teardown failures (this hid the actor-leak symptoms during the Ubuntu investigation).
  • world-server's confirm-side session cleanup never runs, contributing to stale session/actor state (see the ghost-player issue).

Suggested fix

Send error 0 on successful teardown (reserve non-zero for genuine failures), and audit what world-server's confirm-side cleanup should be doing once it finally runs.

Found during the Ubuntu opening-quest root-cause investigation (branch feature/ubuntu, commit f6897e5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Garlemald ServerFor work units related to Garlemald Server.bugSomething isn't working

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions