mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/15692] Close db connection after use storage
PHPBB3-15692
This commit is contained in:
parent
3ebbb8b837
commit
5934bdaaf1
1 changed files with 3 additions and 3 deletions
|
@ -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 ($size)
|
||||
|
@ -238,6 +235,9 @@ function send_file_to_browser($attachment, $category)
|
|||
|
||||
$fp = $storage->read_stream($filename);
|
||||
|
||||
// Close the db connection before sending the file etc.
|
||||
file_gc(false);
|
||||
|
||||
if ($fp !== false)
|
||||
{
|
||||
$output = fopen('php://output', 'w+b');
|
||||
|
|
Loading…
Add table
Reference in a new issue