[Modify] Replace it
This commit is contained in:
parent
b9c2eefaff
commit
e9843b9f25
@ -175,7 +175,7 @@ namespace WebSocketSharp.Net
|
|||||||
if (prefs != null && prefs.Count > 0)
|
if (prefs != null && prefs.Count > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EndPointManager.RemoveEndPoint (this);
|
EndPointManager.RemoveEndPoint (_endpoint.Address, _endpoint.Port);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
||||||
|
@ -186,23 +186,6 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Internal Methods
|
#region Internal Methods
|
||||||
|
|
||||||
internal static void RemoveEndPoint (EndPointListener listener)
|
|
||||||
{
|
|
||||||
lock (((ICollection) _addressToEndpoints).SyncRoot) {
|
|
||||||
var addr = listener.Address;
|
|
||||||
|
|
||||||
Dictionary<int, EndPointListener> endpoints;
|
|
||||||
if (!_addressToEndpoints.TryGetValue (addr, out endpoints))
|
|
||||||
return;
|
|
||||||
|
|
||||||
endpoints.Remove (listener.Port);
|
|
||||||
if (endpoints.Count == 0)
|
|
||||||
_addressToEndpoints.Remove (addr);
|
|
||||||
|
|
||||||
listener.Close ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static bool RemoveEndPoint (IPAddress address, int port)
|
internal static bool RemoveEndPoint (IPAddress address, int port)
|
||||||
{
|
{
|
||||||
lock (((ICollection) _addressToEndpoints).SyncRoot) {
|
lock (((ICollection) _addressToEndpoints).SyncRoot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user