You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Show friend requests as they arrive, instead of a minute later
The list polled once a minute, so a request sent to somebody sitting on the
friends page took up to sixty seconds to appear. Reopening the drawer forced a
fetch, which is why it looked like nothing arrived until you did.
The server now holds a watch request open until something changes, and every
change wakes every watcher at once by closing a channel they are all waiting on.
Measured against a running instance: a request reaches the other side nine
milliseconds after it is sent, against sixty seconds before. A quiet spell ends
after twenty seconds and is asked again, which doubles as the heartbeat that
keeps presence fresh, so nothing is left running on a timer.
Presence deliberately does not wake watchers, except when somebody comes back
from being offline. A launcher left open all day would otherwise wake everyone
once a minute to tell them nothing.
A watch waits only while the caller is exactly up to date. Behind means there is
news now; ahead means this server restarted and began counting again, and
waiting there would leave a launcher holding a number this server will not reach
for hours.
Verified through Caddy as well as against the backend directly, since a request
held open for twenty seconds is the sort of thing a proxy decides to have
opinions about.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>