diff options
author | Wez Furlong <wez@php.net> | 2003-11-28 23:20:23 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2003-11-28 23:20:23 +0000 |
commit | 6d86bb9e40386e4127af4f55b8e8e79864255ca1 (patch) | |
tree | 9242744d6ca9f54179d01a7a957d59dbd7dfeaf8 /ext | |
parent | 3f07e4364cae8499626d5db4a42cb2d4f6aa6af7 (diff) | |
download | php-git-6d86bb9e40386e4127af4f55b8e8e79864255ca1.tar.gz |
(sort of) MFB, feof fix for sockets.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/xp_ssl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index be5d9afedb..9a5732583e 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -437,10 +437,16 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val case PHP_STREAM_OPTION_CHECK_LIVENESS: { fd_set rfds; - struct timeval tv = {0,0}; + struct timeval tv; char buf; int alive = 1; + if (sslsock->s.timeout.tv_sec == -1) { + tv.tv_sec = FG(default_socket_timeout); + } else { + tv = sslsock->s.timeout; + } + if (sslsock->s.socket == -1) { alive = 0; } else { |