Skip to content

Commit

Permalink
Fix interaction with the Sockets API under PHP 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Petar Obradović committed May 7, 2021
1 parent e9aab08 commit 8d9b94e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Phirehose.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ public function consume($reconnect = TRUE)
pcntl_signal_dispatch();
}

// Some sort of socket error has occured
$this->lastErrorNo = is_resource($this->conn) ? @socket_last_error($this->conn) : NULL;
// Some sort of socket error has occurred
$this->lastErrorNo = is_resource($this->conn) ? @socket_last_error() : NULL;
$this->lastErrorMsg = ($this->lastErrorNo > 0) ? @socket_strerror($this->lastErrorNo) : 'Socket disconnected';
$this->log('Phirehose connection error occured: ' . $this->lastErrorMsg,'error');

Expand Down

0 comments on commit 8d9b94e

Please sign in to comment.