sessionSettings['name']; $cookies = $componentContext->getHttpRequest()->getCookieParams(); if (!isset($cookies[$sessionCookieName])) { return; } // TODO: sessionIdentifier might be wrong, probably it should probably be storage identifier $key = new Key('session-' . $cookies[$sessionCookieName]); $lock = $this->lockFactory->createLockFromKey($key, $this->timeToLive, $this->autoRelease); $componentContext->setParameter(SessionLockRequestComponent::class, static::PARAMETER_NAME, $lock); $this->logger->debug('SessionLock: Try to get "' . $key . '"'); $timedOut = \time() + $this->secondsToWait; while (!$lock->acquire() || $timedOut <= \time()) { \usleep(100000); } if (!$lock->isAcquired()) { throw new LockAcquiringException( 'Could not acquire the lock for "' . $key . '" in ' . $this->secondsToWait . ' seconds.', 1652687960 ); } $this->logger->debug('SessionLock: Acquired "' . $key . '"'); } }