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: OnError call twice in svrTransHandler.OnRead #1272

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

Zzhiter
Copy link
Contributor

@Zzhiter Zzhiter commented Mar 3, 2024

What type of PR is this?

fix: svrTransHandler.OnError will be called twice when some error occured in svrTransHandler.OnRead
related issue:#1267

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

修复 OnError 在 svrTransHandler.OnRead 中调用两次

(Optional) More detailed description for this PR(en: English/zh: Chinese).

什么原因造成的

在这个已经合入的PR中,#814
err由nil变为传递给外层
image
err被传递给外层,但是实际上外层的server是默认会对err进行处理的:
image

image
因此,err被处理了两次

解决办法

内层不再处理err,传递给外层的server处理

(Optional) Which issue(s) this PR fixes:

#1267

@Zzhiter Zzhiter requested review from a team as code owners March 3, 2024 07:35
@CLAassistant
Copy link

CLAassistant commented Mar 3, 2024

CLA assistant check
All committers have signed the CLA.

@joway joway assigned joway and ppzqh Mar 4, 2024
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.60%. Comparing base (d36f79e) to head (4e22bf4).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1272      +/-   ##
===========================================
+ Coverage    68.48%   68.60%   +0.12%     
===========================================
  Files          285      285              
  Lines        20646    20643       -3     
===========================================
+ Hits         14140    14163      +23     
+ Misses        5323     5305      -18     
+ Partials      1183     1175       -8     

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

@joway joway merged commit 6967747 into cloudwego:develop Mar 4, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants