diff options
Diffstat (limited to 'main/streams/xp_socket.c')
-rw-r--r-- | main/streams/xp_socket.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index a369bf5ff2..e3ff3fe2ec 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -75,7 +75,8 @@ retry: if (didwrite <= 0) { char *estr; int err = php_socket_errno(); - if (err == EWOULDBLOCK || err == EAGAIN) { + + if (PHP_IS_TRANSIENT_ERROR(err)) { if (sock->is_blocked) { int retval; @@ -169,7 +170,7 @@ static ssize_t php_sockop_read(php_stream *stream, char *buf, size_t count) err = php_socket_errno(); if (nr_bytes < 0) { - if (err == EAGAIN || err == EWOULDBLOCK) { + if (PHP_IS_TRANSIENT_ERROR(err)) { nr_bytes = 0; } else { stream->eof = 1; @@ -815,7 +816,7 @@ static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t php_stream_xport_param *xparam STREAMS_DC) { int clisock; - zend_bool nodelay = 0; + bool nodelay = 0; zval *tmpzval = NULL; xparam->outputs.client = NULL; |