Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix query construction error #2

Merged
merged 2 commits into from
Jun 26, 2020
Merged

Fix query construction error #2

merged 2 commits into from
Jun 26, 2020

Conversation

bemasc
Copy link
Contributor

@bemasc bemasc commented Jun 26, 2020

Queries weren't setting the "RD" bit, so they were not actually
traversing the recursive resolver as intended.

Queries weren't setting the "RD" bit, so they were not actually
traversing the recursive resolver as intended.
@bemasc bemasc requested a review from alalamav June 26, 2020 00:49
@@ -85,7 +85,26 @@ func (s udpDNSReportSender) Send(r choir.Report) error {
if err != nil {
log.Fatal("Failed to reach resolver:", err)
}
c.Write(query)
if _, err := c.Write(query); err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: defer c.Close() and return early to reduce nesting below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bemasc bemasc merged commit fa5f1bf into master Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants