Replaced the RemoveEndPoint (IPEndPoint, EndPointListener) method with the RemoveEndPoint (EndPointListener) method
This commit is contained in:
parent
9ca8c54e8f
commit
328fd5d43d
@ -176,7 +176,7 @@ namespace WebSocketSharp.Net
|
|||||||
if (_all != null && _all.Count > 0)
|
if (_all != null && _all.Count > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EndPointManager.RemoveEndPoint (_endpoint, this);
|
EndPointManager.RemoveEndPoint (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
||||||
|
@ -160,13 +160,14 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Internal Methods
|
#region Internal Methods
|
||||||
|
|
||||||
internal static void RemoveEndPoint (IPEndPoint endpoint, EndPointListener endpointListener)
|
internal static void RemoveEndPoint (EndPointListener endpointListener)
|
||||||
{
|
{
|
||||||
lock (((ICollection) _ipToEndpoints).SyncRoot) {
|
lock (((ICollection) _ipToEndpoints).SyncRoot) {
|
||||||
var eps = _ipToEndpoints[endpoint.Address];
|
var addr = endpointListener.Address;
|
||||||
eps.Remove (endpoint.Port);
|
var eps = _ipToEndpoints[addr];
|
||||||
|
eps.Remove (endpointListener.Port);
|
||||||
if (eps.Count == 0)
|
if (eps.Count == 0)
|
||||||
_ipToEndpoints.Remove (endpoint.Address);
|
_ipToEndpoints.Remove (addr);
|
||||||
|
|
||||||
endpointListener.Close ();
|
endpointListener.Close ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user