mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: begin transaction before update domain
This commit is contained in:
@@ -137,15 +137,15 @@ readonly class RDAPService
|
||||
$rdapServer = $this->fetchRdapServer($tld);
|
||||
$domain = $this->domainRepository->findOneBy(['ldhName' => $idnDomain]);
|
||||
|
||||
$this->em->beginTransaction();
|
||||
$this->em->lock($domain, LockMode::PESSIMISTIC_WRITE);
|
||||
|
||||
$rdapData = $this->fetchRdapResponse($rdapServer, $idnDomain, $domain);
|
||||
|
||||
if (null === $domain) {
|
||||
$domain = $this->initNewDomain($idnDomain, $tld);
|
||||
}
|
||||
|
||||
$this->em->beginTransaction();
|
||||
$this->em->lock($domain, LockMode::PESSIMISTIC_WRITE);
|
||||
|
||||
$this->updateDomainStatus($domain, $rdapData);
|
||||
|
||||
if (in_array('free', $domain->getStatus())) {
|
||||
|
||||
Reference in New Issue
Block a user