Пример #1
0
 public void Heartbeat()
 {
     lock (heartbeatLock) // don't want timer and manual invoke conflicting
     {
         var tmp = MessageProcessor;
         if (tmp != null)
         {
             try
             {
                 tmp.Heartbeat(Context);
             }
             catch (Exception ex)
             {
                 Logger?.Error(ex, $"{Connection.GetHeartbeatIdent()}\tHeartbeat");
             }
         }
         ResurrectDeadListeners();
         WriteLog();
     }
 }
Пример #2
0
 public void Heartbeat()
 {
     lock (heartbeatLock) // don't want timer and manual invoke conflicting
     {
         var tmp = messageProcessor;
         if (tmp != null)
         {
             try
             {
                 tmp.Heartbeat(Context);
             }
             catch (Exception ex)
             {
                 ErrorLog?.WriteLine("{0}\tHeartbeat: {1}", Connection.GetHeartbeatIdent(), ex.Message);
             }
         }
         ResurrectDeadListeners();
         WriteLog();
     }
 }