A call that is over never rings again #162

Merged
paulhitt merged 1 commits from fix/a-dead-call-never-rings into main 2026-09-12 13:31:43 +00:00
paulhitt commented 2026-09-12 13:13:58 +00:00 (Migrated from gitlab.com)

Found while chasing the repeated incoming calls on iOS.

Envelopes are fetched in batches, so the caller's hang-up is regularly decrypted before their offer. The end was checked against the call in progress and, when it matched nothing, dropped and forgotten. The offer behind it then rang a moment later for a call that was already over. Answering that ring did nothing, because nobody was on the other end, and the next queued offer arrived behind it. That is the "I answer or decline and I just get another call" report.

An end is now filed whether or not it matches the call in progress, and every signal is checked against that before it can ring, connect, or wait on anything. The call this device ends is filed the same way, so a late signal from the peer cannot restart it.

The memory is bounded oldest-first at 200. A phone left running for weeks must not keep every call id it has ever seen.

Together with !209 this closes the loop the owner asked for: one device ending a call ends it on the other, whether the other is ringing, connecting, or has not yet heard of the call at all.

A stale offer is filed too: a second delivery of the same dead offer used to record a second missed call for one ring.

Found while chasing the repeated incoming calls on iOS. Envelopes are fetched in batches, so the caller's hang-up is regularly decrypted before their offer. The end was checked against the call in progress and, when it matched nothing, dropped and forgotten. The offer behind it then rang a moment later for a call that was already over. Answering that ring did nothing, because nobody was on the other end, and the next queued offer arrived behind it. That is the "I answer or decline and I just get another call" report. An end is now filed whether or not it matches the call in progress, and every signal is checked against that before it can ring, connect, or wait on anything. The call this device ends is filed the same way, so a late signal from the peer cannot restart it. The memory is bounded oldest-first at 200. A phone left running for weeks must not keep every call id it has ever seen. Together with !209 this closes the loop the owner asked for: one device ending a call ends it on the other, whether the other is ringing, connecting, or has not yet heard of the call at all. A stale offer is filed too: a second delivery of the same dead offer used to record a second missed call for one ring.
paulhitt commented 2026-09-12 13:14:10 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
paulhitt commented 2026-09-12 13:31:44 +00:00 (Migrated from gitlab.com)

mentioned in commit 13f55076b9

mentioned in commit 13f55076b9389fe03a1bf0fb6799b11c21d3fc8c
paulhitt (Migrated from gitlab.com) merged commit 13f55076b9 into main 2026-09-12 13:31:44 +00:00
Sign in to join this conversation.