diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-07-29 16:12:13 +0200 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-07-29 16:12:13 +0200 |
commit | 905ba80ab8f0e7410a5699c9c205da0ebc72b27c (patch) | |
tree | 76fffffe18ace86af7e3755d61ee767ede3ba636 | |
parent | de99010d5348ff12480c731f032dd290e554ef52 (diff) | |
download | php-smpp-905ba80ab8f0e7410a5699c9c205da0ebc72b27c.zip php-smpp-905ba80ab8f0e7410a5699c9c205da0ebc72b27c.tar.gz php-smpp-905ba80ab8f0e7410a5699c9c205da0ebc72b27c.tar.bz2 |
Fixed EAGAIN const, to allowing it to run on non-linux platforms
-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; |