All posts

CortenDesk 0.9.6 fixes stale Active sessions

CortenDesk 0.9.6 fixes stale Active session rows with heartbeat reconciliation and a five-minute sweep.

Illustration of stale connection cords being closed while active cords stay lit.
Stale sessions fixed0.9.6

CortenDesk 0.9.6 fixes session rows that stay Active after the real connection has already ended.

Before this change, the console closed a session only when the client reported a disconnect. If the remote machine rebooted, the network dropped, the client crashed, or the service stopped, that report never arrived. The row stayed open, and reconnecting created another row.

Session closing now has two paths

CortenDesk now closes stale sessions in two ways:

  • Heartbeat reconciliation. Each device already reports its live incoming connections on heartbeat. The console treats that list as authoritative. If the console has an open session for a device and the device no longer lists it, the session is closed. A short grace window protects sessions that have just started.
  • A five-minute sweep. If a device stops heartbeating altogether, there is nothing to reconcile against. Sessions for quiet devices are closed by a timer instead.

Both paths are pinned to the reporting device, so this does not change who can end whose sessions.

Existing stale rows clear themselves after upgrade. Devices still online are reconciled within about 90 seconds. The rest close within five minutes. No manual cleanup is needed.

Updating

There is no migration and no configuration change.

The Docker image runs the Laravel scheduler for you. Manual installs need the scheduler cron for the five-minute sweep to work:

* * * * * cd /path/to/cortendesk && php artisan schedule:run >> /dev/null 2>&1

Heartbeat reconciliation works either way. You can also run the sweep by hand:

php artisan cortendesk:close-stale-sessions

Pull one of the 0.9.6 images:

docker pull marcpope/cortendesk:0.9.6
docker pull ghcr.io/marcpope/cortendesk:0.9.6

Full release notes: CortenDesk 0.9.6.