diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-06-03 00:57:24 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-06-03 00:57:24 -0500 |
commit | eefd77734badd5e435d3cbd2032eddc6e3186a6e (patch) | |
tree | b86d09daefcae2e04f23cef8a2265ed12f57992a /etc | |
parent | 7112bcc8eac852680700340cb296ee08b80b2e4a (diff) | |
download | pfsense-eefd77734badd5e435d3cbd2032eddc6e3186a6e.zip pfsense-eefd77734badd5e435d3cbd2032eddc6e3186a6e.tar.gz |
A number of things block waiting for file download timeouts, sometimes multiple times across multiple files (many URL Table aliases, for instance). The long timeout causes very long boot times (10-20+ minutes) on many configs with pfblocker if booted disconnected from the Internet. This is strictly the timeout for the HTTP/HTTPS connection attempt. Once connected, it can run past that. 5 seconds should be more than enough for any properly-functioning network. Part of Ticket #4442.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d7ffe7d..ffc9e3e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1670,7 +1670,7 @@ function get_freebsd_version() { return $version[0]; } -function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 60, $timeout = 0) { +function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 5, $timeout = 0) { global $config, $g; $fp = fopen($destination, "wb"); @@ -1705,7 +1705,7 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout return ($http_code == 200) ? true : $http_code; } -function download_file_with_progress_bar($url_file, $destination_file, $readbody = 'read_body', $connect_timeout=60, $timeout=0) { +function download_file_with_progress_bar($url_file, $destination_file, $readbody = 'read_body', $connect_timeout = 5, $timeout=0) { global $ch, $fout, $file_size, $downloaded, $config, $first_progress_update, $g; $file_size = 1; $downloaded = 1; |