mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
MFB52: Fixed bug #44874 (dead pfsockopen'ed sockets aren't reaped when the
remote end restarts) # Patch by Richard dot Krehbiel at gmail dot com
This commit is contained in:
@@ -281,7 +281,7 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
|
||||
if (sock->socket == -1) {
|
||||
alive = 0;
|
||||
} else if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
|
||||
if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
|
||||
if (0 >= recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
|
||||
alive = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user