Compare commits
3 commits
da747f2af8
...
f0880cdf13
Author | SHA1 | Date | |
---|---|---|---|
f0880cdf13 | |||
1452d19892 | |||
ac56fee761 |
1 changed files with 7 additions and 7 deletions
|
@ -73,14 +73,14 @@ class SessionLockRequestComponent implements ComponentInterface
|
|||
|
||||
$this->logger->debug('SessionLock: Try to get "' . $key . '"');
|
||||
$timedOut = \time() + $this->secondsToWait;
|
||||
while (!$lock->acquire() || $timedOut <= \time()) {
|
||||
while (!$lock->acquire()) {
|
||||
\usleep(100000);
|
||||
}
|
||||
if (!$lock->isAcquired()) {
|
||||
throw new LockAcquiringException(
|
||||
'Could not acquire the lock for "' . $key . '" in ' . $this->secondsToWait . ' seconds.',
|
||||
1652687960
|
||||
);
|
||||
if (\time() >= $timedOut) {
|
||||
throw new LockAcquiringException(
|
||||
'Could not acquire the lock for "' . $key . '" in ' . $this->secondsToWait . ' seconds.',
|
||||
1652687960
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->logger->debug('SessionLock: Acquired "' . $key . '"');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue