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
UserAgent.stop() function takes too much time #863
Comments
Confirmed it in the code... @john-e-riordan this looks to be an order of operations issue. At the top of We then cycle through The We will work on getting this patched. Thanks. |
Thank you very much for quickly responding and finding the root cause of the problem! Hope it will be fixed soon :) |
To work around this you could dispose of your subscriptions manually before calling |
Thanks! Already done, but not in an efficient way I think. If you can suggest me a better way it be very helpful. The way how I did it currently, but again, I don't like it, for each subscribe event type, I stored the subscriber into a different global variable in the class and for each subscriber variable I'm calling the By the way, what's the difference between |
Any progress😊? How to do this before the bug is fixed? I don't have any subscription, but the Thank you. |
Nope, this issues is not resolved yet.
Preferably, do every action with promises. I mean, use |
I have the same issue. I don't have any subscriptions. For me, closing the WebSocket takes too long, (20-50 secs) I tried:
I don't have any specific configurations, just followed SIP.js guide to reproduce. I don't know if this helps or is related my issue but I tried to open a WebSocket with sip protocol without any library and closed it. They both lasted under 1 second. |
For next release, planning on...
As mentioned, the user can cleanup everything on their own in a manner which works well for their application prior to calling Comments and/or feedback welcome. |
@john-e-riordan thanks for your reply! Thanks again. |
The flag simply skips disposal and otherwise does not wait on the socket to close when
I agree that attempting to send a request when it is known in advance that the transport is closed or otherwise cannot send the message should be avoidable, but gonna say that's a separate issue from the one I'm trying to address here. |
- remove autoStart and autoStop - address issues in onsip#863
Added to main branch and queued up to go out in next release. |
@john-e-riordan Can we add also the use of An additional small issue with the Thanks! |
Describe the bug
For some reason when using "UserAgent.stop()" function it takes around 30 seconds to stop everything until it responses with the appropriate promise.
What I'm trying to achieve is a full unregister command, where it not only make an unregister but also:
From what I understand, the "stop()" function does exactly that. Only it is taking too much time.
Logs
Here are the logs from the console: logs
Observed behavior
Only after around ~32 seconds we can see at: 15:14:05.797
The following log:
sip.subscribe-dialog | Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY.
Only after the above log it is disposing the publishers and the transport (WS) level.
What makes me think that it may occur as a result of that SUBSCRIBE message that it's timer expired, but not entirely sure.
Environment Information
The text was updated successfully, but these errors were encountered: