-
Notifications
You must be signed in to change notification settings - Fork 746
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
JsSIP.UA disconnected event enhancements #163
Comments
UA.stop() should stop re-connection attempts. If it does not do it, then it is a bug. |
When would you like not to recover from a transport error? I agree that UA.stop should stop the recovery process. |
I have one app that connect, make call and disconnect... If I am not able to connect to the server I just inform the user that we have a network error and the call is cancelled.... The process will be repeated only if user try to make a call again... So, for this use case, I don't what to try to connect again because the connection is not important anymore after some seconds... |
Can't you stop the UA after the call is finished? |
Yes, sure, but JsSIP.UA.stop() don't stop the transport recover process... My call was not even started on this case... |
Yep, that is the issue. It is being solved. |
Of, course, that is, assuming UA.stop actually works :-) Looks like @jmillan is on it 👍 |
Thank you guys! |
Thank you for reporting @nilsonfreitas |
Your fix is not working... Please take a look into UA.prototype.recoverTransport method.. window.setTimeout(
function(){
ua.transportRecoverAttempts = count + 1;
new JsSIP.Transport(ua, server);
}, nextRetry * 1000); This timeout has to be cleared as well... Following code will still send unlimited attempts to reconnect: uac.once('disconnected', function(e){
uac.stop();
}); |
- EventEmitter does not emit in the same execution iteration to avoid inestability. Thanks @ibc
You are absolutely right @nilsonfreitas, Such timer was not being cleaned. Its done now. Please, give it a try. |
When disconnected event is fired, jssip try unlimited times to recover the transport and there is no way to tell him to stop!
Suggestions:
What do we have right now is an infinite attempt to recover the transport, even after we call JsSIP.UA.stop() method!
The text was updated successfully, but these errors were encountered: