Skip to content

[targets.dns] Use contexts for backend resolve function - #838

Merged
manugarg merged 1 commit into
masterfrom
dns_context
Aug 28, 2024
Merged

manugarg merged 1 commit into
masterfrom
dns_context

Conversation

@manugarg

@manugarg manugarg commented Aug 28, 2024 •

Copy link
Copy Markdown
Contributor
  • Make the backend resolve function take a context, and call it with a context with timeout.
  • Earlier we were handling timeouts ourselves through a goroutine because when resolver was implemented there was no LookupIP with context. New method is much better.
  • Also, create a custom resolver only once, no need to create a new one on each resolve call.

@manugarg
manugarg merged commit bbb67ae into master Aug 28, 2024
@manugarg
manugarg deleted the dns_context branch August 28, 2024 21:39
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.

1 participant