mirror of
https://github.com/badvision/jace.git
synced 2025-08-12 18:25:19 +00:00
Prevent hanging when removing SSC cards from configuration
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user