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

refactor: unify close/destroy #1278

Merged
merged 4 commits into from Mar 22, 2022
Merged

refactor: unify close/destroy #1278

merged 4 commits into from Mar 22, 2022

Conversation

ronag
Copy link
Member

@ronag ronag commented Mar 14, 2022

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2022

Codecov Report

Merging #1278 (b25e75a) into main (65763ca) will decrease coverage by 0.07%.
The diff coverage is 99.35%.

@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
- Coverage   94.13%   94.05%   -0.08%     
==========================================
  Files          44       45       +1     
  Lines        4091     4055      -36     
==========================================
- Hits         3851     3814      -37     
- Misses        240      241       +1     
Impacted Files Coverage Δ
lib/core/symbols.js 100.00% <ø> (ø)
lib/dispatcher-base.js 98.71% <98.71%> (ø)
lib/agent.js 100.00% <100.00%> (ø)
lib/client.js 97.93% <100.00%> (-0.11%) ⬇️
lib/pool-base.js 96.77% <100.00%> (-0.98%) ⬇️
lib/proxy-agent.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65763ca...b25e75a. Read the comment docs.

@ronag ronag requested a review from mcollina March 18, 2022 19:57
@ronag ronag marked this pull request as ready for review March 18, 2022 19:57
}

if (this[kDestroyed]) {
queueMicrotask(() => callback(new ClientDestroyedError(), null))
Copy link
Member Author

@ronag ronag Mar 18, 2022

Choose a reason for hiding this comment

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

I don't think this was an error before in all cases (hence the updates to test). It behaved inconsistently. Not sure what is most correct.

@ronag ronag force-pushed the unifty-teardown branch 2 times, most recently from 25c3a07 to 33b4fe3 Compare March 18, 2022 20:08
@ronag ronag added the semver-major Features or fixes that will be included in the next semver major release label Mar 18, 2022
@ronag
Copy link
Member Author

ronag commented Mar 20, 2022

@mcollina semver-major or not? wdyt? It will now error some close calls that did not error before.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

I think this should be a semver-major change due to the difference in the error code. Wdyt?

How are the benchmarks before/after?

@ronag
Copy link
Member Author

ronag commented Mar 22, 2022

Benchmarks have only one sample so I don't think they are very accurate but it looks good to me.

@ronag
Copy link
Member Author

ronag commented Mar 22, 2022

I'm good with semver major

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm as semver-major

@ronag ronag merged commit 46953d5 into main Mar 22, 2022
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
* refactor: unify close/destroy

* fixup

* fixup

* fixup
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
* refactor: unify close/destroy

* fixup

* fixup

* fixup
@Uzlopak Uzlopak deleted the unifty-teardown branch February 21, 2024 12:37
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* refactor: unify close/destroy

* fixup

* fixup

* fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Features or fixes that will be included in the next semver major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants