]> granicus.if.org Git - php/commitdiff
MFH: timeout duration too long in liveness checks for sockets.
authorWez Furlong <wez@php.net>
Mon, 19 Apr 2004 12:43:26 +0000 (12:43 +0000)
committerWez Furlong <wez@php.net>
Mon, 19 Apr 2004 12:43:26 +0000 (12:43 +0000)
Fixes Bug #28055

main/network.c

index 5d9c2ae73a39210f5d3e81214cec82180fd609c5..4280765d25c138f3b57cef46e35364c1efd92557 100644 (file)
@@ -1155,15 +1155,9 @@ int _php_network_is_stream_alive(php_stream *stream TSRMLS_DC)
        int alive = 1;
        int fd = sock->socket;
        fd_set rfds;
-       struct timeval tv;
+       struct timeval tv = {0, 0};
        char buf;
        
-       if (sock->timeout.tv_sec == -1) {
-               tv.tv_sec = FG(default_socket_timeout);
-       } else {
-               tv = sock->timeout;
-       }
-
        /* logic: if the select call indicates that there is data to
         * be read, but a read returns 0 bytes of data, then the socket
         * has been closed.