protected override void OnDisable() { isActive = false; mUdp.Stop(); knownServers.Clear(); if (onChange != null) { onChange(); } if (mRequest != null) { mRequest.Recycle(); mRequest = null; } }
protected override void OnDisable() { isActive = false; base.OnDisable(); try { mUdp.Stop(); if (mRequest != null) { mRequest.Recycle(); mRequest = null; } if (onChange != null) { onChange(); } } catch (System.Exception) { } }
private void OnDestroy() { TcpProtocol.Disconnect(); UdpProtocol.Stop(); upnp.Close(); }