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

feat: add signal option to Deno.resolveDns #17384

Merged
merged 7 commits into from
Feb 11, 2023

Conversation

crowlKats
Copy link
Member

Closes #14406

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

It seems resource associated with AbortController is not cleaned up if the API finishes successfully

@crowlKats
Copy link
Member Author

@bartlomieju you are right; this seems to be a problem for Deno.readFile as well. will search for other cases and fix them up & add tests.

@bartlomieju bartlomieju added this to the 1.31 milestone Jan 28, 2023
ext/net/01_net.js Outdated Show resolved Hide resolved
runtime/js/40_read_file.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Oops, requires conflict resolution.

ext/net/ops.rs Outdated Show resolved Hide resolved
# Conflicts:
#	ext/net/01_net.js
#	runtime/js/40_read_file.js
#	runtime/js/40_write_file.js
Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Few unrelated test duplications left over. Do we have a unit test file for DNS APIs where the AbortSignal usage could be tested for leakage like the readFile functions?

cli/tests/unit/read_file_test.ts Outdated Show resolved Hide resolved
cli/tests/unit/read_text_file_test.ts Outdated Show resolved Hide resolved
@crowlKats
Copy link
Member Author

Do we have a unit test file for DNS APIs where the AbortSignal usage could be tested for leakage like the readFile functions?

no; unsure how we could add it as the DNS API has its whole own thing. i'll open an issue to add such a test for now.

@crowlKats crowlKats enabled auto-merge (squash) February 11, 2023 13:58
@crowlKats crowlKats merged commit a55f0eb into denoland:main Feb 11, 2023
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.

Deno.resolveDns do not have timeout option
3 participants