Skip to content

Commit b37c38a

Browse files
committed
LYNX-199: Remove unnecessary place order isLocked check
1 parent bb4825c commit b37c38a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,13 +615,12 @@ protected function submitQuote(QuoteEntity $quote, $orderData = [])
615615
);
616616

617617
$lockedName = self::LOCK_PREFIX . $quote->getId();
618-
if ($this->lockManager->isLocked($lockedName)) {
618+
if (!$this->lockManager->lock($lockedName, self::LOCK_TIMEOUT)) {
619619
throw new LocalizedException(__(
620620
'A server error stopped your order from being placed. Please try to place your order again.'
621621
));
622622
}
623623
try {
624-
$this->lockManager->lock($lockedName, self::LOCK_TIMEOUT);
625624
$order = $this->orderManagement->place($order);
626625
$quote->setIsActive(false);
627626
$this->eventManager->dispatch(

0 commit comments

Comments
 (0)