diff options
Diffstat (limited to 'ext/sockets')
-rw-r--r-- | ext/sockets/sockets.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 6118610cac..a9d0e4b885 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1044,11 +1044,7 @@ PHP_FUNCTION(socket_read) if (retval == -1) { /* if the socket is in non-blocking mode and there's no data to read, don't output any error, as this is a normal situation, and not an error */ - if (errno == EAGAIN -#ifdef EWOULDBLOCK - || errno == EWOULDBLOCK -#endif - ) { + if (PHP_IS_TRANSIENT_ERROR(errno)) { php_sock->error = errno; SOCKETS_G(last_error) = errno; } else { |