diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/DB/Connection.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 6e2db8e47bc..ff365c9b100 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -152,8 +152,6 @@ class Connection extends PrimaryReadReplicaConnection { return parent::connect(); } - $this->lastConnectionCheck[$this->getConnectionName()] = time(); - // Only trigger the event logger for the initial connect call $eventLogger = \OC::$server->get(IEventLogger::class); $eventLogger->start('connect:db', 'db connection opened'); @@ -161,6 +159,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 |