Skip to content

Commit

Permalink
added a more like workaround rather than a perfect fix to re-enable t…
Browse files Browse the repository at this point in the history
…imeouts for query as reported at iwind#114
  • Loading branch information
4th-turning committed Oct 23, 2015
1 parent 939017a commit 1289250
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/lib/mongo/RQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ function hint($hint) {
*/
function cursor() {
$cursor = $this->_collection->find($this->criteria(), $this->_results);
$cursor -> timeout(MServer::currentServer()->mongoTimeout());
if (method_exists($cursor,'maxTimeMS')) {
$cursor -> maxTimeMS(MServer::currentServer()->mongoTimeout());
}
if ($this->_offset >= 0) {
$cursor->skip($this->_offset);
}
Expand Down Expand Up @@ -598,4 +602,4 @@ function db() {
}
}

?>
?>

0 comments on commit 1289250

Please sign in to comment.