Beispiel #1
0
 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);
         }
     }
 }
Beispiel #2
0
 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);
         }
     }
 }
Beispiel #3
0
 private void ServerDisconnected(object sender, EventArgs args)
 {
     Logger?.Invoke("[ClusterClient] Disconnected from server " + _ServerIp + ":" + _ServerPort);
     ClusterUnhealthy?.Invoke(this, EventArgs.Empty);
 }