Fix starting DHT discovery

This commit is contained in:
Ben van Hartingsveldt 2025-07-13 16:01:18 +02:00
parent 364866d905
commit 25e4f24ae9
No known key found for this signature in database
GPG key ID: 261AA214130CE7AB

View file

@ -144,6 +144,7 @@ public class DHTNodeFinderThread implements Runnable{
} }
private void handleIncomingMessages(){ private void handleIncomingMessages(){
new Thread(() -> {
while(DHT.getSocket().isBound()){ while(DHT.getSocket().isBound()){
while(this.incoming.peek()!=null){ while(this.incoming.peek()!=null){
UDP.Packet receiverPacket = this.incoming.poll(); UDP.Packet receiverPacket = this.incoming.poll();
@ -155,6 +156,7 @@ public class DHTNodeFinderThread implements Runnable{
} }
} }
} }
},"DHT Incoming").start();
} }
} }