mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix coroutine DB timeout leakage
This commit is contained in:
@@ -26,6 +26,7 @@ use Appwrite\Network\Platform;
|
||||
use Appwrite\Network\Validator\Origin;
|
||||
use Appwrite\Network\Validator\Redirect;
|
||||
use Appwrite\Usage\Context as UsageContext;
|
||||
use Appwrite\Utopia\Database\Adapter\Pool as DatabasePool;
|
||||
use Appwrite\Utopia\Database\Documents\User;
|
||||
use Appwrite\Utopia\Request;
|
||||
use Appwrite\Utopia\Response;
|
||||
@@ -42,7 +43,6 @@ use Utopia\Auth\Proofs\Token;
|
||||
use Utopia\Auth\Store;
|
||||
use Utopia\Cache\Cache;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Database\Adapter\Pool as DatabasePool;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\DateTime as DatabaseDateTime;
|
||||
use Utopia\Database\Document;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Database\Adapter;
|
||||
|
||||
use Utopia\Database\Database;
|
||||
|
||||
class Pool extends \Utopia\Database\Adapter\Pool
|
||||
{
|
||||
public function setTimeout(int $milliseconds, string $event = Database::EVENT_ALL): void
|
||||
{
|
||||
$this->timeout = $milliseconds;
|
||||
|
||||
$this->delegate(__FUNCTION__, \func_get_args());
|
||||
}
|
||||
|
||||
public function clearTimeout(string $event = Database::EVENT_ALL): void
|
||||
{
|
||||
$this->timeout = 0;
|
||||
|
||||
$this->delegate(__FUNCTION__, \func_get_args());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user