Skip to content

Commit

Permalink
don't pass through connectPersistent bool to sockopen
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeofguenter committed Jul 22, 2016
1 parent f095be7 commit 5464a6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Socket/NativeSocket.php
Expand Up @@ -30,15 +30,16 @@ class NativeSocket implements Socket
* @param string $host
* @param int $port
* @param int $connectTimeout
* @param bool $connectPersistent
*/
public function __construct($host, $port, $connectTimeout, $connectPersistent)
{
if ($connectPersistent) {
$this->_socket = $this->_wrapper()
->pfsockopen($host, $port, $errno, $errstr, $connectTimeout, $connectPersistent);
->pfsockopen($host, $port, $errno, $errstr, $connectTimeout);
} else {
$this->_socket = $this->_wrapper()
->fsockopen($host, $port, $errno, $errstr, $connectTimeout, $connectPersistent);
->fsockopen($host, $port, $errno, $errstr, $connectTimeout);
}

if (!$this->_socket) {
Expand Down

0 comments on commit 5464a6d

Please sign in to comment.