fix: database.core.DatabaseDriver (set connection timeout to 5s)
This commit is contained in:
parent
b706948b3a
commit
272c928375
|
@ -69,8 +69,10 @@
|
|||
|
||||
try{
|
||||
|
||||
$this->pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
|
||||
$this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
||||
$this->pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password, [
|
||||
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
|
||||
\PDO::ATTR_TIMEOUT => 5
|
||||
]);
|
||||
|
||||
// On signale que tout s'est bien passe
|
||||
$this->error = new Error(Err::Success);
|
||||
|
|
Loading…
Reference in New Issue