Skip to content

Commit

Permalink
Fix connecting to unix socket
Browse files Browse the repository at this point in the history
Needed so connecting to unix socket can work. Otherwise _path is cleared later in method. If _path is cleared then _Connect will use default port instead of 0 and will fail. Original SphinxClient.php has those returns.
  • Loading branch information
lenar committed Jan 12, 2016
1 parent 81e14ea commit ed938db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NilPortugues/Sphinx/SphinxClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ public function setServer($host, $port = 0)
assert(is_string($host));
if ($host[0] == '/') {
$this->_path = 'unix://' . $host;
return;
}
if (substr($host, 0, 7) == "unix://") {
$this->_path = $host;
return;
}

$this->_host = $host;
Expand Down

0 comments on commit ed938db

Please sign in to comment.