Skip to content

CortenDesk 0.9.6

Choose a tag to compare

@marcpope marcpope released this 26 Jul 08:26

Fixed

  • Sessions that never stop showing as Active (#10).

    A session row was only ever closed by one thing: the client reporting the disconnect to the console. Every other way a session can end — the remote machine rebooting, the network dropping, the client crashing, the service being stopped — skipped that report, so the row stayed open and the console listed the session as Active indefinitely. Reconnecting created a second row, so an interrupted session left one dead entry behind every time, and nothing an operator could do from the console cleared them.

    Two mechanisms now close them, because neither covers both failure modes on its own:

    • Heartbeat reconciliation. Every device already reports its own list of live incoming connections on each heartbeat, and that list is authoritative. Any session the console has open for a device that the device no longer lists is closed. A short grace window protects a session that has only just started, so a live session is never cut short.
    • A five-minute sweep for the case reconciliation cannot see: a device that has stopped heartbeating altogether — powered off, unplugged, or with the service stopped — sends nothing to reconcile against. Sessions belonging to devices that have gone quiet are closed on a timer instead.

    Both paths are pinned to the reporting device, so this changes nothing about who can end whose sessions.

    Reported by @dragonidium11.

Notes

  • No migration and no configuration changes.
  • Existing stale rows clear themselves after upgrade — devices still online are reconciled within about 90 seconds, the rest within five minutes. No manual cleanup.
  • The five-minute sweep runs on the Laravel scheduler. The Docker image runs the scheduler for you. Manual installs need the scheduler cron (* * * * * cd /path/to/cortendesk && php artisan schedule:run >> /dev/null 2>&1) for that half to work — heartbeat reconciliation works either way. It can also be run by hand with php artisan cortendesk:close-stale-sessions.
docker pull marcpope/cortendesk:0.9.6
docker pull ghcr.io/marcpope/cortendesk:0.9.6