send notifies after adding zones all zones (#5774)

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2023-02-15 13:25:02 -05:00
committed by GitHub
parent ad623eb0d6
commit 77c7c0b4cb
4 changed files with 21 additions and 5 deletions

View File

@@ -8,8 +8,7 @@ import (
"github.com/miekg/dns"
)
// Notify will send notifies to all configured to hosts IP addresses. If the zone isn't known
// to t an error will be returned. The string zone must be lowercased.
// Notify will send notifies to all configured to hosts IP addresses. The string zone must be lowercased.
func (t *Transfer) Notify(zone string) error {
if t == nil { // t might be nil, mostly expected in tests, so intercept and to a noop in that case
return nil
@@ -21,7 +20,8 @@ func (t *Transfer) Notify(zone string) error {
x := longestMatch(t.xfrs, zone)
if x == nil {
return fmt.Errorf("no such zone registred in the transfer plugin: %s", zone)
// return without error if there is no matching zone
return nil
}
var err1 error