From: Wez Furlong Date: Mon, 19 Apr 2004 12:43:26 +0000 (+0000) Subject: MFH: timeout duration too long in liveness checks for sockets. X-Git-Tag: php-4.3.7RC1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c722bee9cf448649277f7d1e657ee57131d51c1;p=php MFH: timeout duration too long in liveness checks for sockets. Fixes Bug #28055 --- diff --git a/main/network.c b/main/network.c index 5d9c2ae73a..4280765d25 100644 --- a/main/network.c +++ b/main/network.c @@ -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.