Returns immediately if checks have already been done.

This commit is contained in:
Boris Grozev 2015-11-08 10:05:18 -06:00
parent 3a49e56475
commit 7a8b7ec2c3

View File

@ -111,8 +111,9 @@ public class StunMappingCandidateHarvester
*/
private static synchronized boolean obtainAddresses()
{
if(mask != null && face != null)
return true;
if (addressChecked)
return;
addressChecked = true;
try
{
@ -155,7 +156,6 @@ public class StunMappingCandidateHarvester
logger.info("Detected through stun local IP: " + face);
logger.info("Detected through stun public IP: " + mask);
addressChecked = true;
}
catch (Exception exc)
{