From 4c722bee9cf448649277f7d1e657ee57131d51c1 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 19 Apr 2004 12:43:26 +0000 Subject: [PATCH] MFH: timeout duration too long in liveness checks for sockets. Fixes Bug #28055 --- main/network.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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. -- 2.50.1