[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)
|
if (prefs != null && prefs.Count > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EndPointManager.RemoveEndPoint (_endpoint);
|
Close ();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void onAccept (IAsyncResult asyncResult)
|
private static void onAccept (IAsyncResult asyncResult)
|
||||||
@ -484,6 +484,8 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
for (var i = conns.Length - 1; i >= 0; i--)
|
for (var i = conns.Length - 1; i >= 0; i--)
|
||||||
conns[i].Close (true);
|
conns[i].Close (true);
|
||||||
|
|
||||||
|
EndPointManager.RemoveEndPoint (_endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemovePrefix (HttpListenerPrefix prefix)
|
public void RemovePrefix (HttpListenerPrefix prefix)
|
||||||
|
@ -208,17 +208,9 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
internal static bool RemoveEndPoint (IPEndPoint endpoint)
|
internal static bool RemoveEndPoint (IPEndPoint endpoint)
|
||||||
{
|
{
|
||||||
lock (((ICollection) _endpoints).SyncRoot) {
|
lock (((ICollection) _endpoints).SyncRoot)
|
||||||
EndPointListener lsnr;
|
|
||||||
|
|
||||||
if (!_endpoints.TryGetValue (endpoint, out lsnr))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
lsnr.Close ();
|
|
||||||
|
|
||||||
return _endpoints.Remove (endpoint);
|
return _endpoints.Remove (endpoint);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user