mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
broadcast receive fix 3
This commit is contained in:
@@ -37,6 +37,7 @@ public class LocalPeerDiscoveryBroadcaster {
|
||||
}
|
||||
|
||||
void shutdown(@Observes @Priority(10) ShutdownEvent event) {
|
||||
_socket.close();
|
||||
_broadcasterThread.interrupt();
|
||||
while (_broadcasterThread.isAlive()) {
|
||||
try {
|
||||
@@ -44,7 +45,6 @@ public class LocalPeerDiscoveryBroadcaster {
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void broadcast() {
|
||||
|
||||
@@ -36,8 +36,15 @@ public class LocalPeerDiscoveryClient {
|
||||
}
|
||||
|
||||
void shutdown(@Observes @Priority(10) ShutdownEvent event) throws InterruptedException {
|
||||
_socket.close();
|
||||
_clientThread.interrupt();
|
||||
_clientThread.join();
|
||||
_clientThread.interrupt();
|
||||
while (_clientThread.isAlive()) {
|
||||
try {
|
||||
_clientThread.join();
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void client() {
|
||||
|
||||
Reference in New Issue
Block a user