mirror of
https://github.com/zeronsh/comet.git
synced 2026-11-16 18:57:19 +00:00
A phone's direct link stays up while its chat is viewed
The owner's call: a link should be up by the time someone sends, so it opens when a chat is opened and stays while it's on screen with the app in front, for up to 5 minutes of nothing happening (LINK_IDLE, was 60 s). A send after that brings it straight back, and the room carries the send meanwhile. A sleeping Cloud machine reads host_online=false, so viewing never wakes one. - A chat has to stay open 300 ms before it pairs, so flicking through chats doesn't pair each one. - Leaving a chat keeps its link 10 s, so going straight back reuses it. The app going to the background, or the network, the host or the relay generation going, still ends it at once. - A link that lived a minute and then dropped retries after 1 s instead of 15 s. On a real iPhone the room carried 16 s of stream after each clean close. The room now hands the link task the whole LinkWanted, so the task can tell leaving a chat from going to the background. Showing a chat never waits on any of this: the link runs on its own task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
This commit is contained in:
parent
1a63ab2f3d
commit
0a49ea3e42
2 changed files with 161 additions and 24 deletions
Loading…
Add table
Add a link
Reference in a new issue