usedContacts.addAll(contactList);
for(KadContact contact : contactList) {
bootStrapContacts.add(contact);
usedContacts.add(contact);
InternalNetworkManager x = (InternalNetworkManager) NetworkManagerSingleton.getInstance();
if (routingTable.getTotalContacts()<MIN_CONTACTS_TO_SEND_BOOTSTRAP) {
KadPacket packet;
try {
packet = PacketFactory.getBootStrap1ReqPacket();
x.sendKadPacket(packet, contact.getIPAddress(), contact.getUDPPort());
} catch (JMException e) {
e.printStackTrace();
}
} else {
KadPacket packet;
try {
packet = PacketFactory.getHello2ReqPacket(org.jmule.core.edonkey.packet.tag.TagList.EMPTY_TAG_LIST);
x.sendKadPacket(packet, contact.getIPAddress(), contact.getUDPPort());
} catch (JMException e) {
e.printStackTrace();
}
}