Patch main_streams_xp_socket_eof for SOAP related Bug #67292
Patch version 2014-05-19 14:19 UTC
Return to Bug #67292 |
Download this patch
Patch Revisions:
Developer: ghpille@hotmail.com
--- php5.4-201405161030/main/streams/xp_socket.c 2014-04-02 12:43:38.000000000 +0200
+++ php5.4/main/streams/xp_socket.c 2014-05-19 16:12:35.020152916 +0200
@@ -277,6 +277,7 @@
struct timeval tv;
char buf;
int alive = 1;
+ int res = 0;
if (value == -1) {
if (sock->timeout.tv_sec == -1) {
@@ -293,7 +294,11 @@
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) {
+ res = recv(sock->socket, &buf, sizeof(buf), MSG_PEEK);
+ if (0 == res) {
+ alive = 0;
+ }
+ if (0 >= res && php_socket_errno() != EWOULDBLOCK) {
alive = 0;
}
}
|