public virtual void Stop() {
/*
* Hopefully we can get garbage collection moving
* sooner. Some EdgeListeners have threads that
* won't stop immediately, so the idea is to make
* sure they don't keep references to the node
* around
*/
EdgeCloseRequestEvent = null;
EdgeEvent = null;
}
/* * 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(); }