nandi/frqpublic Fork 0
a225fb1
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Stop mistaking a quiet connection for a closed one

Sending worked once after signing in and never again. jolt's TLS sockets carry
a 30-second receive timeout, so a channel with nothing to say reads nothing
without being closed — and the reader took that for EOF, announced a
disconnect, and cleared the connection. Everything after that went into the
buffer the user was looking at and nowhere else: the message appeared, and no
one received it. Guests rarely saw it because a busy channel never idles that
long, and OAuth put every signed-in user on TLS.

So a quiet stretch is now a quiet stretch. Past 45 seconds it earns a PING,
and only silence after that counts as gone — which is the ping-timeout
detection the client never actually had.

TLS also stopped being written from two threads at once. OpenSSL is driven
here through a pair of memory BIOs with no locking of its own, and the reader
parks inside SSL_read for the whole timeout; queueing lines for the reader to
flush removes the question entirely. That wants a short poll, so TLS sockets
now time out every 200ms — which is also the longest a line waits to go out.

FRQ_TRACE=1 prints every line in and out. It is what turned this up, along
with the discovery that the test observer watching from outside had been dying
of its own unanswered pings and reporting the app's messages as lost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T10:27:53-07:00 Browse files
a225fb1 parent: 0742154
modified README.md +6 -0
@@ -20,6 +20,11 @@ src/frq/state.jolt the ratoms every screen reads, and `apply-msg!`
2020 src/frq/app.jolt the screens
2121 ```
2222
23+## Tracing
24+
25+`FRQ_TRACE=1` prints every IRC line sent and received to stderr, which on
26+Android is logcat.
27+
2328 ## Running
2429
2530 `libvidya` from Vidya's Rust/egui backend, then the app:
@@ -108,4 +113,5 @@ surface — that surface does not work on Android either, while the syscalls do.
108113 * **Only the broker token is persisted**, and only for OAuth. An app-password
109114 sign-in is not remembered.
110115 * **No scrollback trimming, avatars, reactions, threads, or calls.**
116+* A sent line waits up to 200ms for the reader thread to flush it.
111117 * Message lists are keyed vboxes; glimmer-vidya has no `:listbox` yet.
@@ -20,6 +20,11 @@ src/frq/state.jolt the ratoms every screen reads, and `apply-msg!`
20 src/frq/app.jolt the screens20 src/frq/app.jolt the screens
21 ```21 ```
22 22
23+## Tracing
24+
25+`FRQ_TRACE=1` prints every IRC line sent and received to stderr, which on
26+Android is logcat.
27+
23 ## Running28 ## Running
24 29
25 `libvidya` from Vidya's Rust/egui backend, then the app:30 `libvidya` from Vidya's Rust/egui backend, then the app:
@@ -108,4 +113,5 @@ surface — that surface does not work on Android either, while the syscalls do.
108 * **Only the broker token is persisted**, and only for OAuth. An app-password113 * **Only the broker token is persisted**, and only for OAuth. An app-password
109 sign-in is not remembered.114 sign-in is not remembered.
110 * **No scrollback trimming, avatars, reactions, threads, or calls.**115 * **No scrollback trimming, avatars, reactions, threads, or calls.**
116+* A sent line waits up to 200ms for the reader thread to flush it.
111 * Message lists are keyed vboxes; glimmer-vidya has no `:listbox` yet.117 * Message lists are keyed vboxes; glimmer-vidya has no `:listbox` yet.