summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-02-24 17:25:40 +0100
committerGitHub <noreply@github.com>2017-02-24 17:25:40 +0100
commit9c91c7bd747074b8cdaa90e8810f0c2df081f72d (patch)
treeb7c999d85e7a427ace71e3c81e2169f990446866 /src/etc/inc/pkg-utils.inc
parent69860ee4f5ff9f1e5b87bc6fdcb6dfea66062726 (diff)
downloadpfsense-9c91c7bd747074b8cdaa90e8810f0c2df081f72d.zip
pfsense-9c91c7bd747074b8cdaa90e8810f0c2df081f72d.tar.gz
Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
Diffstat (limited to 'src/etc/inc/pkg-utils.inc')
-rw-r--r--src/etc/inc/pkg-utils.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc
index df6a755..3c5653b 100644
--- a/src/etc/inc/pkg-utils.inc
+++ b/src/etc/inc/pkg-utils.inc
@@ -140,7 +140,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 {
@@ -148,7 +148,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);
OpenPOWER on IntegriCloud