← Dev log
Ferry·distributed & realtime·2026-11-25

"Online" was a claim nobody re-checked

Idle and freshly paired peers showed offline while reachable; stale ones showed online after they had gone.

It could not have worked

A race, an ordering, one column holding two things. The shape ruled it out before the code ran.

Peer status was wrong in both directions. Idle peers and freshly paired ones showed offline while they were sitting on the same network; peers that had left kept showing online for a while.

Presence was derived from mDNS resolve events with a 90-second window. That can't work, and not because of a bug in the window. Discovery tells you something announced itself at some point. An unchanged service isn't announced again, so a peer that's been quietly present for ten minutes produces no events at all and ages out. The input simply doesn't contain the answer.

The replacement asks the question directly: an authenticated probe to each known peer every 20 seconds, two failures before flipping to offline, inbound traffic counted as contact, and "recently seen" shown as its own state rather than rounded to one side. The UI also stopped drawing "the daemon answers" and "the daemon's networking works" as the same green dot.

A second bug hid under the same symptom. With Docker or a VPN on the machine, a peer has several addresses, and the first one to accept a TCP connection won — even when the Noise handshake then showed it was a different machine. Address selection now includes the identity check instead of stopping at the connect.