I found that version 1.3.2 will postpone the shutdown of the app using it as library. I followed the control point example, and I call start() and stop() on the control point appropriately. I solved the issue by setting threads as daemons that are created in the following classes:
Because I don't kill the threads using Thread::stop(), the thread may stop immediately.
I will check the threads to stop more early, but I have intersted in your solution. Could you tell me your settion threads as demons ?
For example, the SSDPSearchResponseSocket class gets stuck on the receive() call within the thread. Because this appears to be a blocking call without a timeout, the thread waits until something is received, and the thread will stay alive until then. By setting the thread as daemon in the start() method, the thread will not stay alive after the application dies. Here is my modification for SSDPSearchResponseSocket:
public void start()
deviceSearchResponseThread = new Thread(this);
I didn't know the method, I will add some changes about the all threads to use ThreadCore class, and try to be able finish the threads imediately using the method :-)
Log in to post a comment.