aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/Connection.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 1b61cc83319..e2e36f83c88 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -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