Skip to content

Commit 6c75016

Browse files
committed
Improve php_openssl_sockop_set_option logic for liveness poll skipping
1 parent 84b570e commit 6c75016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/xp_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val
23992399

24002400
if (sslsock->s.socket == -1) {
24012401
alive = 0;
2402-
} else if ((!sslsock->ssl_active && value == 0 && (MSG_DONTWAIT || !sslsock->s.is_blocked)) ||
2402+
} else if ((value == 0 && ((!sslsock->ssl_active && MSG_DONTWAIT) || !sslsock->s.is_blocked)) ||
24032403
php_pollfd_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
24042404
/* the poll() call was skipped if the socket is non-blocking (or MSG_DONTWAIT is available) and if the timeout is zero */
24052405
/* additionally, we don't use this optimization if SSL is active because in that case, we're not using MSG_DONTWAIT */

0 commit comments

Comments
 (0)