Make the obtain*Addresses methods static again, because they modify

static fields and should obtain the lock on the class.
This commit is contained in:
Boris Grozev 2015-11-07 12:06:16 -06:00
parent 947f06ae22
commit b228636412
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class AwsCandidateHarvester
* @return <tt>true</tt> if we managed to obtain addresses or someone else
* had already achieved that before us, <tt>false</tt> otherwise.
*/
private synchronized boolean obtainEC2Addresses()
private static synchronized boolean obtainEC2Addresses()
{
if(mask != null && face != null)
return true;

View File

@ -109,7 +109,7 @@ public class StunMappingCandidateHarvester
* @return <tt>true</tt> if we managed to obtain addresses or someone else
* had already achieved that before us, <tt>false</tt> otherwise.
*/
private synchronized boolean obtainAddresses()
private static synchronized boolean obtainAddresses()
{
if(mask != null && face != null)
return true;