Changeset 3381559 in mod_gnutls


Ignore:
Timestamp:
Apr 19, 2018, 2:46:25 PM (3 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, debian/master, master, proxy-ticket
Children:
6945efb
Parents:
0cdfb19
Message:

Adjust intervals for async OCSP updates based on cache expiry or failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_ocsp.c

    r0cdfb19 r3381559  
    964964        apr_global_mutex_unlock(sc->ocsp_mutex);
    965965
    966     /* TODO: error handling, fuzzy interval */
    967 
    968     ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s,
    969                  "Async OCSP update done for %s:%d.",
    970                  s->server_hostname, s->addrs->host_port);
     966    /* TODO: fuzzy interval */
     967    apr_interval_time_t next_interval = expiry - apr_time_now();
     968    if (rv != APR_SUCCESS)
     969        next_interval = sc->ocsp_failure_timeout;
     970    sc->singleton_wd->set_callback_interval(sc->singleton_wd->wd,
     971                                            next_interval,
     972                                            s, mgs_async_ocsp_update);
     973
     974    /* TODO: cache error if no cache entry present to inhibit
     975     * request-triggered updates */
     976    ap_log_error(APLOG_MARK, rv == APR_SUCCESS ? APLOG_DEBUG : APLOG_ERR, rv, s,
     977                 "Async OCSP update %s for %s:%d, next update in "
     978                 "%" APR_TIME_T_FMT " seconds.",
     979                 rv == APR_SUCCESS ? "done" : "failed",
     980                 s->server_hostname, s->addrs->host_port,
     981                 apr_time_sec(next_interval));
    971982
    972983    return APR_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.