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: reverse emit function list when beforeClose hook #264

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

noahziheng
Copy link
Member

beforeClose 钩子通常用于进行业务逻辑的收尾处理,此时仍可能使用插件提供的 Client;

正向触发 hook 可能造成插件中的链接比应用更早被回收,不符合预期;

所以简单地针对这个钩子,在 emitHook 阶段反转 fnList

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (d9528e0) 91.63% compared to head (3b7ad46) 91.65%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #264      +/-   ##
==========================================
+ Coverage   91.63%   91.65%   +0.01%     
==========================================
  Files          49       49              
  Lines        1184     1186       +2     
  Branches      212      214       +2     
==========================================
+ Hits         1085     1087       +2     
  Misses         99       99              
Files Changed Coverage Δ
src/application.ts 88.40% <100.00%> (ø)
src/lifecycle/index.ts 88.00% <100.00%> (+0.50%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@noahziheng noahziheng merged commit 7dc2e05 into master Aug 31, 2023
@noahziheng noahziheng deleted the fix/before-close-hook-reverse branch August 31, 2023 03:10
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.

4 participants