Call Thread.currentThread().interrupt() when handling interruption.

This commit is contained in:
akwizgran
2014-03-12 21:11:11 +00:00
parent b99a503f24
commit b270f0e8b1
7 changed files with 16 additions and 2 deletions

View File

@@ -159,6 +159,7 @@ class ConnectorGroup extends Thread implements InvitationTask {
for(Connector c : connectors) c.join();
} catch(InterruptedException e) {
LOG.warning("Interrupted while waiting for connectors");
Thread.currentThread().interrupt();
}
// If none of the threads connected, inform the listeners
if(!connected.get()) {

View File

@@ -252,6 +252,7 @@ abstract class DuplexConnection implements EventListener {
}
} catch(InterruptedException e) {
LOG.warning("Interrupted while waiting for task");
Thread.currentThread().interrupt();
dispose(true, true);
} catch(IOException e) {
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);