cooling/cooling.cc
/// Rsked died at some point. If it was already marked as broken, see if
/// it is eligible to be restarted--if not, then just return.  If it recently
/// had crashed, then mark it as broken and do not attempt to restart now.
///
Rsked died at some point. If it was already marked as broken, see if
it is eligible to be restarted--if not, then just return.  If it recently
had crashed, then mark it as broken and do not attempt to restart now.
Rsked died at some point . If it was already marked as broken see if it is eligible to be restarted -- if not then just return . If it recently had crashed then mark it as broken and do not attempt to restart now .
void Cooling::maybe_restart_rsked()
{
    time_t tnow=time(0);
    if (m_rsked_broken) {       
        if ((tnow - m_last_rsked_crash) < Rsked_restart_cooldown_secs)  {
            return;            
        }
    } else {                    
        LOG_ERROR(Lgr) << "rsked seems to be dead";
        ++m_rsked_errors;
        if ((tnow - m_last_rsked_crash) < Min_intercrash_secs) {
            mark_rsked_broken(tnow);
            return;
        }
        m_last_rsked_crash = tnow;
    }
    start_rsked();              
}
void Cooling :: maybe_restart_rsked ( ) { time_t tnow = time ( 0 ) ; if ( m_rsked_broken ) { if ( ( tnow - m_last_rsked_crash ) < Rsked_restart_cooldown_secs ) { return ; } } else { LOG_ERROR ( Lgr ) << " " ; ++ m_rsked_errors ; if ( ( tnow - m_last_rsked_crash ) < Min_intercrash_secs ) { mark_rsked_broken ( tnow ) ; return ; } m_last_rsked_crash = tnow ; } start_rsked ( ) ; }
Rsked died at some point.
Rsked died at some point .
// was already marked as broken // it is too soon to attempt a restart // not yet marked as broken--possibly mark it so // attempt restart