useVoice polls GET /voice/calls/:id every 2 seconds. In src/client/useVoice.ts the .catch() on that poll sets Call control connection was lost. and calls end() right away. So one failed poll, for example during a short network flap, ends the call even if the peer connection would have recovered.
#26 adds a five-second grace period for RTCPeerConnection disconnected. It does not cover this path. Credit to kvnloo for spotting it in the review of #26.
I have not reproduced this in a real browser. This is from reading the code.
Questions to settle:
- Should a single failed poll end the call, or only a run of failures?
- Should the poll failure and the peer state share one "recoverable" window?
Acceptance cases suggested on #26:
- transient control-poll failure with a recoverable peer: observe whether the call still ends
- persistent peer or control failure: the call ends once, with one saved receipt
Written with AI help, checked against the source by me.
useVoicepollsGET /voice/calls/:idevery 2 seconds. Insrc/client/useVoice.tsthe.catch()on that poll setsCall control connection was lost.and callsend()right away. So one failed poll, for example during a short network flap, ends the call even if the peer connection would have recovered.#26 adds a five-second grace period for
RTCPeerConnectiondisconnected. It does not cover this path. Credit to kvnloo for spotting it in the review of #26.I have not reproduced this in a real browser. This is from reading the code.
Questions to settle:
Acceptance cases suggested on #26:
Written with AI help, checked against the source by me.