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(); } }
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(); } }