I got a Socket Server running as a Java SwingWorker.
The SwingWorker receives incoming connections, and upon connection, hands over the socket to an Executor that takes care of the connection. The Executor calls a SocketHandler that will handle the socket via the run() method.
Now, I have one button on the GUI that says stop. I want to stop the SwingWorker from execution when i press the Stop button. To do so, I had a cancel(true) method called upon pressing the Stop button.
Now, the SocketHandler continues receiving incoming data despite my program calling the cancel(true) method. What's going on here?
I had read thru couple articles that it's a bug within the JDK that calling cancel(true) method does not stop the SwingWorker. Is this true?