fix: OnError call twice in svrTransHandler.OnRead #1272
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
(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变为传递给外层
err被传递给外层,但是实际上外层的server是默认会对err进行处理的:
因此,err被处理了两次
解决办法
内层不再处理err,传递给外层的server处理
(Optional) Which issue(s) this PR fixes:
#1267