aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-08-14 10:58:50 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-08-14 10:58:50 +0200
commit7efca53b4734573e2bc1e4f306ee6f8e0b94515f (patch)
tree1c64ca544a554b74a2268a7fcdcb848e81468ba6 /phpBB
parent9ad1e41b4b3590e0ae92d404dbe6cb396102ec6a (diff)
parent17b871914476d74f5e61d41d842ab1f6dd50db82 (diff)
downloadforums-7efca53b4734573e2bc1e4f306ee6f8e0b94515f.tar
forums-7efca53b4734573e2bc1e4f306ee6f8e0b94515f.tar.gz
forums-7efca53b4734573e2bc1e4f306ee6f8e0b94515f.tar.bz2
forums-7efca53b4734573e2bc1e4f306ee6f8e0b94515f.tar.xz
forums-7efca53b4734573e2bc1e4f306ee6f8e0b94515f.zip
Merge remote-tracking branch 'dhruvgoel92/ticket/11032' into develop
* dhruvgoel92/ticket/11032: [ticket/11032] sphinx retries before triggering error
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index fa7bd01f39..0319f971dc 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -492,6 +492,15 @@ class phpbb_search_fulltext_sphinx
$this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
$result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+ // Could be connection to localhost:9312 failed (errno=111,
+ // msg=Connection refused) during rotate, retry if so
+ $retries = SPHINX_CONNECT_RETRIES;
+ while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--)
+ {
+ usleep(SPHINX_CONNECT_WAIT_TIME);
+ $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+ }
+
if ($this->sphinx->GetLastError())
{
add_log('critical', 'LOG_SPHINX_ERROR', $this->sphinx->GetLastError());
@@ -505,15 +514,6 @@ class phpbb_search_fulltext_sphinx
}
}
- // Could be connection to localhost:9312 failed (errno=111,
- // msg=Connection refused) during rotate, retry if so
- $retries = SPHINX_CONNECT_RETRIES;
- while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--)
- {
- usleep(SPHINX_CONNECT_WAIT_TIME);
- $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
- }
-
$id_ary = array();
if (isset($result['matches']))
{