diff options
author | doktornotor <notordoktor@gmail.com> | 2017-02-24 17:25:40 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-03-02 16:25:21 -0300 |
commit | a21a36fe3b31d5838ed1fd6e96437aca9df0e06b (patch) | |
tree | fd4a4c88a5cf7557ca0626e49eaedefd0baa8c69 /src/etc | |
parent | 877676ee199a399ae5495543b080527bd34037f7 (diff) | |
download | pfsense-a21a36fe3b31d5838ed1fd6e96437aca9df0e06b.zip pfsense-a21a36fe3b31d5838ed1fd6e96437aca9df0e06b.tar.gz |
Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index ef3e7b8..cda5517 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -171,7 +171,7 @@ function pkg_call($params, $mute = false, $extra_env = array()) { stream_set_blocking($pipes[2], 0); /* XXX: should be a tunnable? */ - $timeout = 300; // seconds + $timeout = 60; // seconds $error_log = ''; do { @@ -179,7 +179,7 @@ function pkg_call($params, $mute = false, $extra_env = array()) { $read = array($pipes[1], $pipes[2]); $except = array(); - $stream = stream_select($read, $write, $except, null, $timeout); + $stream = stream_select($read, $write, $except, $timeout); if ($stream !== FALSE && $stream > 0) { foreach ($read as $pipe) { $content = stream_get_contents($pipe); |