Skip to content

Commit

Permalink
fix: DNS accept a valid reply
Browse files Browse the repository at this point in the history
What a very stupid mistake: in the retry loop for doing the DNS queries, stop
when we get a successful result.

This should speed things up a bit, and ensure that a successful result is
remembered instead of only the last query (after some hammering) mattering.
  • Loading branch information
philpennock committed Nov 26, 2020
1 parent feb61a0 commit 8b0c07a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions resolve.go
Expand Up @@ -155,6 +155,9 @@ DNS_RRTYPE_LOOP:
r = nil
continue DNS_RESOLVER_LOOP
}
if r != nil {
break
}
}

if r == nil {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Expand Up @@ -13,7 +13,7 @@ import (
const ProjectName = "smtpdane"

// may be updated by the linker on the link command-line when compiling
var Version string = "0.4.0"
var Version string = "0.4.1"

func version() {
fmt.Printf("%s version %s\n", ProjectName, Version)
Expand Down

0 comments on commit 8b0c07a

Please sign in to comment.