fix grpc bugs#40
Merged
gxcsoccer merged 4 commits intosofastack:masterfrom Mar 26, 2019
Merged
Conversation
Contributor
smile21
commented
Mar 19, 2019
- 修复 grpc invoke 多次但返回数据相同问题
- 修复grpc server service 用户逻辑抛异常,但调用方长时间无响应问题
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
=========================================
- Coverage 98.55% 98.46% -0.1%
=========================================
Files 38 38
Lines 1871 1890 +19
=========================================
+ Hits 1844 1861 +17
- Misses 27 29 +2
Continue to review full report at Codecov.
|
gxcsoccer
reviewed
Mar 25, 2019
| const responseType = methodInfo.resolvedResponseType; | ||
| const buf = responseType.encode(responseType.fromObject(res.appResponse)).finish(); | ||
| const resSize = buf.length; | ||
| io.position(0); |
gxcsoccer
reviewed
Mar 25, 2019
| this.stream.close(http2.constants.NGHTTP2_INTERNAL_ERROR); | ||
| } | ||
| return; | ||
| } |
gxcsoccer
reviewed
Mar 25, 2019
| appResponse: null, | ||
| }); | ||
| throw new Error('not found service: ' + id); | ||
| } else { |
Member
|
感谢 PR |
gxcsoccer
reviewed
Mar 26, 2019
| } | ||
| this._endCall(err); | ||
| this.destroy(); | ||
| this.emit('close'); |
Member
There was a problem hiding this comment.
这个应该不用主动触发吧? destroy 以后会自动触发 close
Contributor
Author
There was a problem hiding this comment.
是的 我的 node 是 v8.x ,在这个版本里 destroy 后收不到 close 事件,所以我手动 emit 了一个
Contributor
Author
There was a problem hiding this comment.
可能和这个 pr 有关 nodejs/node#23654 v8.x 目前还是有这个问题
gxcsoccer
reviewed
Mar 26, 2019
| }; | ||
| let data = ''; | ||
| if (res.isError) { | ||
| this.meta.rt = Date.now() - this.meta.start; |
Member
|
sofa-rpc-node@1.11.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.