Skip to content

Commit 4e04c9c

Browse files
committed
CLOUDNS: populate zone cache when creating zone
1 parent bdf8bef commit 4e04c9c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

providers/cloudns/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ func (c *cloudnsProvider) createDomain(domain string) error {
185185
if _, err := c.get("/dns/register.json", params); err != nil {
186186
return fmt.Errorf("failed create domain (ClouDNS): %w", err)
187187
}
188+
c.Lock()
189+
defer c.Unlock()
190+
if c.domainIndex != nil {
191+
c.domainIndex[domain] = domain
192+
}
188193
return nil
189194
}
190195

0 commit comments

Comments
 (0)