KLALB 3.6.0开发一半的状态
This commit is contained in:
@@ -15,16 +15,14 @@ import java.net.NetworkInterface;
|
||||
import java.net.NoRouteToHostException;
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.time.Duration;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class IPMulticastDiscovery extends Thread implements Closeable, AutoCloseable {
|
||||
public class IPMulticastDiscovery implements Closeable, AutoCloseable {
|
||||
private static final boolean debug=false;
|
||||
|
||||
private MulticastSocket soc;
|
||||
@@ -79,9 +77,7 @@ public class IPMulticastDiscovery extends Thread implements Closeable, AutoClose
|
||||
this.timeInterval=timeInterval;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread.currentThread().setName("线路发现线程");
|
||||
public void start() {
|
||||
|
||||
ThreadTool.makeVDaemonThreadIfSupport("线路通知线程", () -> {
|
||||
try {
|
||||
@@ -143,6 +139,7 @@ public class IPMulticastDiscovery extends Thread implements Closeable, AutoClose
|
||||
|
||||
}).start();
|
||||
|
||||
ThreadTool.makeVDaemonThreadIfSupport("线路发现线程",()->{
|
||||
try {
|
||||
loop:while (!closed) {
|
||||
try {
|
||||
@@ -199,6 +196,7 @@ public class IPMulticastDiscovery extends Thread implements Closeable, AutoClose
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user