Compare commits

..

3 commits

Author SHA1 Message Date
5e62c2b02d Merge branch 'release/2.1.2' 2022-05-16 12:08:53 +02:00
24283b795f Check first, then wait 2022-05-16 12:08:39 +02:00
d294df5079 Merge tag '2.1.1' into develop
Tagging 2.1.1
2022-05-16 12:04:43 +02:00

View file

@ -74,13 +74,13 @@ class SessionLockRequestComponent implements ComponentInterface
$this->logger->debug('SessionLock: Try to get "' . $key . '"');
$timedOut = \time() + $this->secondsToWait;
while (!$lock->acquire()) {
\usleep(100000);
if (\time() >= $timedOut) {
throw new LockAcquiringException(
'Could not acquire the lock for "' . $key . '" in ' . $this->secondsToWait . ' seconds.',
1652687960
);
}
\usleep(100000);
}
$this->logger->debug('SessionLock: Acquired "' . $key . '"');
}