EventDispatcher stuck on exit

When trying to stop the EventDispatcher using setActive(false), the dispatchEvent Thread never terminates as it is stuck in the following while loop until an event is being processed:

private void dispatchEvent()
{
JRadiusEvent event;

while(true)
{
try
{
event = this.eventQueue.take();
break;
}
catch(InterruptedException e)
{
}
}

........ more code.

As you can see, even if interrupted, the thread will go right back to wait for the next event on the queue.

Here is the program to repro the issue:

public static void main(String[] args) {
EventDispatcher dispatcher = new EventDispatcher();

dispatcher.start();
Scanner keyIn = new Scanner(System.in);
System.out.print("Press the enter key to continue\n");
keyIn.nextLine();
dispatcher.setActive(false);
System.out.println("Done (The program should terminate, but does not");
}

Check the subversion code...

Check the subversion code... some work has been recently on that class.