mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 01:00:50 -04:00
Merge pull request #51017 from nextcloud/backport/50874/stable31
[stable31] fix: Initialize lastConnectionCheck after first connection
This commit is contained in:
commit
5b421c99c6
1 changed files with 2 additions and 2 deletions
|
|
@ -218,8 +218,6 @@ class Connection extends PrimaryReadReplicaConnection {
|
|||
return parent::connect();
|
||||
}
|
||||
|
||||
$this->lastConnectionCheck[$this->getConnectionName()] = time();
|
||||
|
||||
// Only trigger the event logger for the initial connect call
|
||||
$eventLogger = Server::get(IEventLogger::class);
|
||||
$eventLogger->start('connect:db', 'db connection opened');
|
||||
|
|
@ -227,6 +225,8 @@ class Connection extends PrimaryReadReplicaConnection {
|
|||
$status = parent::connect();
|
||||
$eventLogger->end('connect:db');
|
||||
|
||||
$this->lastConnectionCheck[$this->getConnectionName()] = time();
|
||||
|
||||
return $status;
|
||||
} catch (Exception $e) {
|
||||
// throw a new exception to prevent leaking info from the stacktrace
|
||||
|
|
|
|||
Loading…
Reference in a new issue