private void CliServerDisconnect(object sender, EventArgs args) { if (ClusterUnhealthy != null) { TimeSpan ts = DateTime.Now - _UnhealthyCalled; if (ts.TotalSeconds > 1) { _UnhealthyCalled = DateTime.Now; ClusterUnhealthy?.Invoke(this, EventArgs.Empty); } } }
private void SrvClientDisconnect(object sender, PeerConnectedEventArgs args) { _CurrPeerIpPort = null; if (ClusterUnhealthy != null) { TimeSpan ts = DateTime.Now - _UnhealthyCalled; if (ts.TotalSeconds > 1) { _UnhealthyCalled = DateTime.Now; ClusterUnhealthy?.Invoke(this, EventArgs.Empty); } } }
private void ServerDisconnected(object sender, EventArgs args) { Logger?.Invoke("[ClusterClient] Disconnected from server " + _ServerIp + ":" + _ServerPort); ClusterUnhealthy?.Invoke(this, EventArgs.Empty); }