mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
[ticket/15692] Close db connection after use storage
PHPBB3-15692
This commit is contained in:
@@ -223,9 +223,6 @@ function send_file_to_browser($attachment, $category)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the db connection before sending the file etc.
|
|
||||||
file_gc(false);
|
|
||||||
|
|
||||||
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
||||||
{
|
{
|
||||||
if ($size)
|
if ($size)
|
||||||
@@ -238,6 +235,9 @@ function send_file_to_browser($attachment, $category)
|
|||||||
|
|
||||||
$fp = $storage->read_stream($filename);
|
$fp = $storage->read_stream($filename);
|
||||||
|
|
||||||
|
// Close the db connection before sending the file etc.
|
||||||
|
file_gc(false);
|
||||||
|
|
||||||
if ($fp !== false)
|
if ($fp !== false)
|
||||||
{
|
{
|
||||||
$output = fopen('php://output', 'w+b');
|
$output = fopen('php://output', 'w+b');
|
||||||
|
Reference in New Issue
Block a user