WordPress.org

Make WordPress Core

Ticket #11831: reasonable_cron_request_timeout.diff

File reasonable_cron_request_timeout.diff, 603 bytes (added by eliotsykes, 5 years ago)

Patch to give cron http request a reasonable timeout of 1 second rather than 0.01 secs

  • wp-includes/cron.php

     
    231231        set_transient( 'doing_cron', $local_time ); 
    232232 
    233233        $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron'; 
    234         wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); 
     234        wp_remote_post( $cron_url, array('timeout' => 1, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); 
    235235} 
    236236 
    237237/**