Synchronize access to candidateSockets.get(). (#203)

* Synchronize access to candidateSockets.get().

* Remove XXX comment about synchronization.
This commit is contained in:
Jonathan Lennox 2021-09-17 16:48:45 -04:00 committed by GitHub
parent 9dc08bd299
commit d7c0e27a1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,7 +379,6 @@ public class SinglePortUdpHarvester
componentSocket.add(multiplexing);
}
// XXX is this necessary?
synchronized (candidateSockets)
{
IceSocketWrapper oldSocket
@ -404,9 +403,11 @@ public class SinglePortUdpHarvester
@Override
protected IceSocketWrapper getCandidateIceSocketWrapper(
SocketAddress remoteAddress)
{
synchronized (candidateSockets)
{
return candidateSockets.get(remoteAddress);
}
}
}
}