Prevent hanging when removing SSC cards from configuration

This commit is contained in:
Brendan Robert 2015-08-08 04:02:40 -05:00
parent 1e99990b34
commit e01a3049c2
1 changed files with 3 additions and 1 deletions

View File

@ -152,6 +152,7 @@ public class CardSSC extends Card implements Reconfigurable {
hangUp();
socketInput = null;
}
Thread.yield();
} catch (SocketTimeoutException ex) {
// Do nothing
} catch (IOException ex) {
@ -446,7 +447,8 @@ public class CardSSC extends Card implements Reconfigurable {
hangUp();
if (listenThread != null && listenThread.isAlive()) {
try {
listenThread.join();
listenThread.interrupt();
listenThread.join(100);
} catch (InterruptedException ex) {
Logger.getLogger(CardSSC.class.getName()).log(Level.SEVERE, null, ex);
}