fix: Closes the MultiplexingDatagramSocket instances created by single-port UDP candidates.
This commit is contained in:
parent
5085b042bb
commit
a524e1b2c0
@ -307,6 +307,11 @@ public class SinglePortUdpHarvester
|
|||||||
|
|
||||||
synchronized (candidateSockets)
|
synchronized (candidateSockets)
|
||||||
{
|
{
|
||||||
|
for (IceSocketWrapper wrapper : candidateSockets.values())
|
||||||
|
{
|
||||||
|
wrapper.close();
|
||||||
|
}
|
||||||
|
|
||||||
candidateSockets.clear();
|
candidateSockets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +377,14 @@ public class SinglePortUdpHarvester
|
|||||||
// XXX is this necessary?
|
// XXX is this necessary?
|
||||||
synchronized (candidateSockets)
|
synchronized (candidateSockets)
|
||||||
{
|
{
|
||||||
candidateSockets.put(remoteAddress, candidateSocket);
|
IceSocketWrapper oldSocket
|
||||||
|
= candidateSockets.put(remoteAddress, candidateSocket);
|
||||||
|
if (oldSocket != null)
|
||||||
|
{
|
||||||
|
logger.warning("Replacing the socket for remote address "
|
||||||
|
+ remoteAddress);
|
||||||
|
oldSocket.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX is this necessary?
|
// XXX is this necessary?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user