if (errno == EAGAIN && err == SSL_ERROR_WANT_READ && read) {
retry = 1;
}
- if (errno == EAGAIN && SSL_ERROR_WANT_WRITE && read == 0) {
+ if (errno == EAGAIN && err == SSL_ERROR_WANT_WRITE && read == 0) {
retry = 1;
}
-
+
/* Also, on reads, we may get this condition on an EOF. We should check properly. */
if (read) {
- stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle));
+ stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle));
}
-
+
/* Now, if we have to wait some time, and we're supposed to be blocking, wait for the socket to become
* available. Now, php_pollfd_for uses select to wait up to our time_left value only...
*/