mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10278] Also set timeout on stream in get_remote_file().
From the PHP manual for fsockopen(): If you need to set a timeout for reading/writing data over the socket, use stream_set_timeout(), as the timeout parameter to fsockopen() only applies while connecting the socket. http://www.php.net/manual/en/function.fsockopen.php PHPBB3-10278
This commit is contained in:
parent
540ca1a8d8
commit
2ffdf56bfe
1 changed files with 2 additions and 0 deletions
|
@ -3140,6 +3140,8 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||||
@fputs($fsock, "HOST: $host\r\n");
|
@fputs($fsock, "HOST: $host\r\n");
|
||||||
@fputs($fsock, "Connection: close\r\n\r\n");
|
@fputs($fsock, "Connection: close\r\n\r\n");
|
||||||
|
|
||||||
|
stream_set_timeout($fsock, $timeout);
|
||||||
|
|
||||||
$file_info = '';
|
$file_info = '';
|
||||||
$get_info = false;
|
$get_info = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue