]> granicus.if.org Git - php/commit
Fix a bug in the persistent socket liveness checks and feof(); they were
authorWez Furlong <wez@php.net>
Wed, 4 Feb 2004 22:46:44 +0000 (22:46 +0000)
committerWez Furlong <wez@php.net>
Wed, 4 Feb 2004 22:46:44 +0000 (22:46 +0000)
commita44838e8a3072114ba4e23486efcd219ae0c0f9c
tree48e8f6040c2ce30e39439ca9c724fc52c0cab5bf
parent7fa5cdcb72025f118c842b52032034758b16b3c4
Fix a bug in the persistent socket liveness checks and feof(); they were
using the default socket timeout of 60 seconds before returning the socket
to the calling script.  The reason they were using that value is that the
same code is used for feof(), so the fix is allowing the caller to
indicate the timeout value for liveness checks.

A possible remaining issue now is that 0 second timeout[1] for pfsockopen
is possibly too short; it's impossible to specify a sane value for all
possible uses, so maybe we need a stream context or an .ini option to
control this, or maybe use the timeout value that was passed to
pfsockopen().

# [1] by timeout, I mean the time that PHP will wait for data on a
# persistent socket before deciding if a new connection should be made;
# NOT the timeout while waiting for a new connection to be established.
main/streams/streams.c
main/streams/transports.c
main/streams/xp_socket.c