-
Notifications
You must be signed in to change notification settings - Fork 147
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
Cleaning up threads #12
Comments
hi, here is what is done in peers-gui, in EventManager to close the remaining
I think you can do the same. The example provided in documentation is just a basic example to start On Sat, Sep 19, 2015 at 2:41 AM, legate [email protected] wrote:
|
Experienced similiar isssue. Using peers library for testing of VoIP system, so when the test is over, I cannot call System.exit. Most of the threads that are still going, are TimerThreads (InviteHandler, TransactionManager and RegisterHandler have their timers scheduled, but never cancelled) |
The code in pull request is great, but does not solve the register handler problem. Even though the timer is cancelled in RegisterHandler.unregister, there are still TimerThreads going, when the useragent unregisters. The reason is that when RegisterHandler.successResponseReceived is called, new Timer is created and task scheduled, but the old timer is never cancelled and refference to it is lost. This could be solved by calling: right before creating new Timer. |
Good catch. I updated the PR to close the timer when refreshing, if a timer already exists. |
to
But propram stil running, not terminate. Please help me to fix it. |
I tried running the EventManager sample at http://peers.sourceforge.net/files/html/peers.html. If I make a call, then hang up, even though the main thread completes, the program does not stop because there are still some threads running (TransactionManager, InviteHandler, TransportManager). Is there a way I can stop the remaining threads so the program will exit cleanly?
The text was updated successfully, but these errors were encountered: