diff options
-rw-r--r-- | sockettransport.class.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sockettransport.class.php b/sockettransport.class.php index 156aae8..d6bce99 100644 --- a/sockettransport.class.php +++ b/sockettransport.class.php @@ -305,7 +305,7 @@ class SocketTransport 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; |