forked from Apple-2-Tools/jace
Prevent hanging when removing SSC cards from configuration
This commit is contained in:
parent
1e99990b34
commit
e01a3049c2
@ -152,6 +152,7 @@ public class CardSSC extends Card implements Reconfigurable {
|
|||||||
hangUp();
|
hangUp();
|
||||||
socketInput = null;
|
socketInput = null;
|
||||||
}
|
}
|
||||||
|
Thread.yield();
|
||||||
} catch (SocketTimeoutException ex) {
|
} catch (SocketTimeoutException ex) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@ -446,7 +447,8 @@ public class CardSSC extends Card implements Reconfigurable {
|
|||||||
hangUp();
|
hangUp();
|
||||||
if (listenThread != null && listenThread.isAlive()) {
|
if (listenThread != null && listenThread.isAlive()) {
|
||||||
try {
|
try {
|
||||||
listenThread.join();
|
listenThread.interrupt();
|
||||||
|
listenThread.join(100);
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
Logger.getLogger(CardSSC.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(CardSSC.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user