rsked/playermgr.cc
/// Check internet availability. Warn in the log if unavailable,
/// but not too frequently.
///
Check internet availability. Warn in the log if unavailable,
but not too frequently.
Check internet availability . Warn in the log if unavailable but not too frequently .
bool Player_manager::check_inet()
{
    time_t warn_repeat_secs = 3600; 
    bool previously_working = m_inet_ready;
    m_inet_ready = c_ichecker.inet_ready();
    if (not m_inet_ready) {
        time_t tt=time(0);
        if ((tt - m_last_inet_warning) > warn_repeat_secs) {
            m_last_inet_warning = tt;
            LOG_WARNING(Lgr) << "Internet seems to be unavailable";
        }
        return false;
    }
    if (not previously_working) {
        LOG_INFO(Lgr) << "Internet service is available";
    }
    return true;
}
bool Player_manager :: check_inet ( ) { time_t warn_repeat_secs = 3600 ; bool previously_working = m_inet_ready ; m_inet_ready = c_ichecker . inet_ready ( ) ; if ( not m_inet_ready ) { time_t tt = time ( 0 ) ; if ( ( tt - m_last_inet_warning ) > warn_repeat_secs ) { m_last_inet_warning = tt ; LOG_WARNING ( Lgr ) << " " ; } return false ; } if ( not previously_working ) { LOG_INFO ( Lgr ) << " " ; } return true ; }
Check internet availability.
Check internet availability .
// hourly //