/*
* Stop the underlying EdgeListener. This is important to stop any
* thread and resources that might be allocated by that EdgeListener.
*/
public void Stop()
{
foreach (Edge e in _unannounced.Values)
{
try {
e.Close();
} catch (Exception ex) {
ProtocolLog.WriteIf(ProtocolLog.Exceptions, ex.ToString());
}
}
_running = false;
if (_rrm_fe != null)
{
_rrm_fe.TryCancel();
}
if (_edge_fe != null)
{
_edge_fe.TryCancel();
}
if (_timer_thread != null)
{
_timer_thread.Join();
}
_el.Stop();
}