Skip to content

Commit

Permalink
Merged EAGAIN const fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cypres committed Jul 29, 2011
2 parents d416fb0 + 905ba80 commit 30cf1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sockettransport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function hasData()
public function read($length)
{
$d = socket_read($this->socket,$length,PHP_BINARY_READ);
if ($d === false && socket_last_error() === 11) return false; // sockets give 11 (EAGAIN) on timeout
if ($d === false && socket_last_error() === SOCKET_EAGAIN) return false; // sockets give EAGAIN on timeout
if ($d === false) throw new SocketTransportException('Could not read '.$length.' bytes from socket; '.socket_strerror(socket_last_error()), socket_last_error());
if ($d === '') return false;
return $d;
Expand Down

0 comments on commit 30cf1e1

Please sign in to comment.