Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2xx retransmission issues #131

Closed
gavllew opened this issue Jul 10, 2013 · 1 comment · Fixed by #132
Closed

2xx retransmission issues #131

gavllew opened this issue Jul 10, 2013 · 1 comment · Fixed by #132

Comments

@gavllew
Copy link
Contributor

gavllew commented Jul 10, 2013

I've noted a couple of issues with the 2xx retransmissions in RTCSession.

On rare occasions, I have noted unexpected 200 transmissions - an ACK has been received, but 200s are retransmitted regardless. I suspect this is due to a race condition with set/clear timeout calls in the browser. JavaScript is fundamentally single-threaded, so a timeout expiring results in an extra event being added to a queue. If we are currently processing an incoming ACK at the moment the timer expires (before we clear the retransmit timer), we end up sending an additional 200 response immediately after the ACK processing finishes, and then continue sending 200 responses because the supposedly cleared timer has been reset.

I've also noticed that the 2xx retransmission schedule is a bit odd. The timeout doubles after each retransmission until it reaches T2, then retransmissions stop. I think this is an incorrect interpretation of section 13.3.1.4 - the doubling is supposed to stop, not the retransmissions. The retransmissions should only stop in one of the following cases:

  • An ACK is received
  • 64*T1 seconds have passed (timer H)

A pull request with my suggested changes will follow shortly.

gavllew pushed a commit to crocodilertc/JsSIP that referenced this issue Jul 10, 2013
@jmillan
Copy link
Member

jmillan commented Jul 10, 2013

@gavllew this is perfect

jmillan added a commit that referenced this issue Jul 10, 2013
Fix #131. Improvements to 2xx retransmission behaviour
jmillan pushed a commit that referenced this issue Jul 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants