Skip to content

Control-poll failure ends a call immediately, even if the peer would recover #38

Description

@charan-rathore

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions