diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-06-03 00:57:24 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-06-03 01:05:09 -0500 |
commit | a320af182152be9e8a04295a31cfe94e2a52ff18 (patch) | |
tree | dd975d6390c7ca21a4f7b2b0af6f9c6614468249 /etc/inc | |
parent | 9f390fb82bb6041c0ec359cd3dbc48f272eed30d (diff) | |
download | pfsense-a320af182152be9e8a04295a31cfe94e2a52ff18.zip pfsense-a320af182152be9e8a04295a31cfe94e2a52ff18.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.
Conflicts:
etc/inc/pfsense-utils.inc
Diffstat (limited to 'etc/inc')
-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 867e606..8e24eb4 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1753,7 +1753,7 @@ function get_freebsd_version() { return $version[0]; } -function download_file($url, $destination, $verify_ssl = true, $connect_timeout = 60, $timeout = 0) { +function download_file($url, $destination, $verify_ssl = true, $connect_timeout = 5, $timeout = 0) { global $config, $g; $fp = fopen($destination, "wb"); @@ -1790,7 +1790,7 @@ function download_file($url, $destination, $verify_ssl = true, $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; |