baresip / re

Generic library for real-time communications with async IO support
BSD 3-Clause "New" or "Revised" License
135 stars 83 forks source link

sipreg/reg.c: stop retrying registers early after 401/407 #1143

Closed maximilianfridrich closed 4 months ago

maximilianfridrich commented 4 months ago

Currently, REGISTERs are retried until the loop detection mechanism kicks in, which results in 16 unsuccessful REGISTERs being sent in very quick succession if the REGISTER can't be authorized (401 or 407 responses).

Now, on 401 and 407 responses, the REGISTER is only retried once (instead of 16 times). Re-trying the same request 16 times with the same auth credentials doesn't make much sense.