[Modify] Move them
This commit is contained in:
parent
94ca3ee723
commit
067f2cd4f9
@ -222,7 +222,7 @@ namespace WebSocketSharp.Net
|
||||
if (prefs != null && prefs.Count > 0)
|
||||
return;
|
||||
|
||||
EndPointManager.RemoveEndPoint (_endpoint);
|
||||
Close ();
|
||||
}
|
||||
|
||||
private static void onAccept (IAsyncResult asyncResult)
|
||||
@ -484,6 +484,8 @@ namespace WebSocketSharp.Net
|
||||
|
||||
for (var i = conns.Length - 1; i >= 0; i--)
|
||||
conns[i].Close (true);
|
||||
|
||||
EndPointManager.RemoveEndPoint (_endpoint);
|
||||
}
|
||||
|
||||
public void RemovePrefix (HttpListenerPrefix prefix)
|
||||
|
@ -208,16 +208,8 @@ namespace WebSocketSharp.Net
|
||||
|
||||
internal static bool RemoveEndPoint (IPEndPoint endpoint)
|
||||
{
|
||||
lock (((ICollection) _endpoints).SyncRoot) {
|
||||
EndPointListener lsnr;
|
||||
|
||||
if (!_endpoints.TryGetValue (endpoint, out lsnr))
|
||||
return false;
|
||||
|
||||
lsnr.Close ();
|
||||
|
||||
lock (((ICollection) _endpoints).SyncRoot)
|
||||
return _endpoints.Remove (endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user