Skip to content

Commit

Permalink
Merge pull request nextcloud#50874 from nextcloud/artonge/fix/login_f…
Browse files Browse the repository at this point in the history
…low_v2_sessions

fix: Initialize lastConnectionCheck after first connection
  • Loading branch information
juliusknorr authored Feb 25, 2025
2 parents b0653e9 + 066c92f commit 0427d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/DB/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ public function connect($connectionName = null) {
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');
/** @psalm-suppress InternalMethod */
$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
Expand Down

0 comments on commit 0427d5d

Please sign in to comment.