-
Notifications
You must be signed in to change notification settings - Fork 821
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
调用 server.Stop() 时疑似对应 Stream 不会关闭 #983
Comments
的确,这是由于*nphttp2.svrTransHandler没有实现remote.GracefulShutdown接口导致,调用svr.Stop()无法真正关闭server的connection。如果你有解法,欢迎来个ap~ |
我是小白,想请教一下,这个问题持续存在的原因,是涉及的已有逻辑或设计模式太多所以很难改吗,还是说这个关闭连接的需求没有太大的必要性呢,因为我印象里 gRPC 框架是可以强制关闭服务器和对应连接的 |
这个问题原因就是nphttp2.svrTransHandler没有实现remote.GracefulShutdown接口,其实要修复也简单,就是让nphttp2.svrTransHandler实现remote.GracefulShutdown接口就行了,在remote.GracefulShutdown函数内把gRPC连接用goaway关闭。感兴趣的话可以给我们提个pr |
这个问题有实现的计划吗 |
我当时尝试实现,失败了,只记得好像不止 Jayant 说得那么简单(也可能是我太菜) |
OK,我看一下这个问题 |
|
ok,后面那个问题我回你了,这个stop问题我先记下 |
@jayantxie any progress ? |
Describe the bug
调用 server.Stop() 后,对应 Stream 的 ReadMsg() 不会读出 err
To Reproduce
Steps to reproduce the behavior:
Expected behavior
count 先 5,再 0
Kitex version:
v0.6.0
Environment:
GOVERSION=go1.19.8
大概率是我没正确使用吧,但自己确实搞不明白了。以及若想得到预期效果,大概要怎么写呢
The text was updated successfully, but these errors were encountered: