mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-02 06:57:40 +00:00
fix calculation of timeout
This commit is contained in:
parent
5bd85e50f6
commit
f6f9ad8c6d
|
@ -44,14 +44,17 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
}
|
||||
|
||||
$output = '';
|
||||
$timeleft = $timeout - time();
|
||||
$read = array($pipes[1]);
|
||||
$write = NULL;
|
||||
$exeptions = NULL;
|
||||
do {
|
||||
$timeleft = $timeout - time();
|
||||
$read = array($pipes[1]);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, 200000);
|
||||
stream_select($read, $write, $exeptions, $timeleft, 200000);
|
||||
|
||||
if (!empty($read)) {
|
||||
$output .= fread($pipes[1], 8192);
|
||||
}
|
||||
$timeleft = $timeout - time();
|
||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||
|
||||
if ($timeleft <= 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user