system/Session/Handlers/RedisHandler.php
public function close(): bool
	{
		if (isset($this->redis))
		{
			try
			{
				if ($this->redis->ping() === '+PONG')
				{
					isset($this->lockKey) && $this->redis->delete($this->lockKey);

					if (! $this->redis->close())
					{
						return false;
					}
				}
			}
			catch (\RedisException $e)
			{
				$this->logger->error('Session: Got RedisException on close(): ' . $e->getMessage());
			}

			$this->redis = null;

			return true;
		}

		return true;
	}
public function close(): bool
	{
		if (isset($this->redis))
		{
			try
			{
				if ($this->redis->ping() === '+PONG')
				{
					isset($this->lockKey) && $this->redis->delete($this->lockKey);

					if (! $this->redis->close())
					{
						return false;
					}
				}
			}
			catch (\RedisException $e)
			{
				$this->logger->error('Session: Got RedisException on close(): ' . $e->getMessage());
			}

			$this->redis = null;

			return true;
		}

		return true;
	}
Close

Releases locks and closes connection.

@return boolean