if (nr_bytes <= 0) {
retry = handle_ssl_error(stream, nr_bytes TSRMLS_CC);
- if (retry == 0 && !SSL_pending(sock->ssl_handle)) {
- stream->eof = 1;
- }
+ stream->eof = (retry == 0 && !SSL_pending(sock->ssl_handle));
} else {
/* we got the data */
break;
nr_bytes = recv(sock->socket, buf, count, 0);
- if (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK)) {
- stream->eof = 1;
- }
+ stream->eof = (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK));
}
if (nr_bytes > 0) {