/// <summary> /// Stops the discovery. /// </summary> public void StopDiscovery() { Stopped = true; RetryTimer?.Dispose(); RetryTimer = null; foreach (var udpClient in UdpSendClients) { udpClient.Close(); } }
public void Stop() { try { RetryTimer.Dispose(); NetworkClient.Close(); } catch { } }
/// <summary> /// Stops the discovery. /// </summary> public void StopDiscovery() { Stopped = true; if (UdpClient != null) { UdpClient.Close(); UdpClient = null; } if (RetryTimer != null) { RetryTimer.Dispose(); RetryTimer = null; } }