Add a log message when using StunMappingCandidateHarvester. (#238)
* log: Add a log message when using StunMappingCandidateHarvester. * ref: Use lambda, fix formating.
This commit is contained in:
parent
d7c0e27a1c
commit
d4a145374f
@ -199,8 +199,7 @@ public class MappingCandidateHarvesters
|
||||
if (face.getAddress().equals(h.getFace().getAddress())
|
||||
&& mask.getAddress().equals(h.getMask().getAddress()))
|
||||
{
|
||||
logger.info("Discarding a mapping harvester with duplicate "
|
||||
+ "addresses: " + harvester + ". Kept: " + h);
|
||||
logger.info("Discarding a mapping harvester with duplicate addresses: " + harvester + ". Kept: " + h);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -263,21 +262,17 @@ public class MappingCandidateHarvesters
|
||||
TransportAddress localAddress
|
||||
= new TransportAddress(localInetAddress, 0, Transport.UDP);
|
||||
|
||||
logger.info("Using " + remoteAddress + " for StunMappingCandidateHarvester (localAddress="
|
||||
+ localAddress + ").");
|
||||
final StunMappingCandidateHarvester stunHarvester
|
||||
= new StunMappingCandidateHarvester(
|
||||
localAddress,
|
||||
remoteAddress);
|
||||
|
||||
Callable<StunMappingCandidateHarvester> task
|
||||
= new Callable<StunMappingCandidateHarvester>()
|
||||
{
|
||||
@Override
|
||||
public StunMappingCandidateHarvester call()
|
||||
throws Exception
|
||||
Callable<StunMappingCandidateHarvester> task = () ->
|
||||
{
|
||||
stunHarvester.discover();
|
||||
return stunHarvester;
|
||||
}
|
||||
};
|
||||
tasks.add(task);
|
||||
}
|
||||
@ -285,8 +280,7 @@ public class MappingCandidateHarvesters
|
||||
|
||||
// Now run discover() on all created harvesters in parallel and pick
|
||||
// the ones which succeeded.
|
||||
ExecutorService es = ExecutorFactory.createFixedThreadPool(tasks.size(),
|
||||
"ice4j.Harvester-executor-");
|
||||
ExecutorService es = ExecutorFactory.createFixedThreadPool(tasks.size(), "ice4j.Harvester-executor-");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user