Skip to content

Commit

Permalink
Move Redis close command
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonXLF authored Dec 12, 2023
1 parent 6bb6a44 commit 8125e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ private function getNamespaceInfo(string $namespace): array|null {
$redis->auth($redisAuth);
}

$redis->close();

$prefix = Config::get('redis-prefix');
$ver = 'v' . self::REDIS_DB_VER;
$nsInfoHashKey = "$prefix:$ver:{$this->databaseName}";
Expand All @@ -82,6 +80,8 @@ private function getNamespaceInfo(string $namespace): array|null {

$namespaceInfoString = $redis->hGet($nsInfoHashKey, strtolower($namespace));

$redis->close();

if (!$namespaceInfoString) {
return null;
}
Expand Down

0 comments on commit 8125e1e

Please sign in to comment.