-
Notifications
You must be signed in to change notification settings - Fork 84
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
idle sweeper: Don't close connections with pending calls #712
Conversation
a3357f5
to
6178642
Compare
As documented in #701, we currently attempt closing connections even if they have pending calls. This can cause issues if the calls is stuck as the connection enters start-close, so it'll reject new incoming calls, but it doesn't close, so the remote side keeps sending calls over the same connection. Fixes #701.
6178642
to
595bdfc
Compare
Codecov Report
@@ Coverage Diff @@
## dev #712 +/- ##
==========================================
+ Coverage 87.39% 87.73% +0.33%
==========================================
Files 40 40
Lines 4047 4052 +5
==========================================
+ Hits 3537 3555 +18
+ Misses 386 377 -9
+ Partials 124 120 -4
Continue to review full report at Codecov.
|
idle_sweep_test.go
Outdated
|
||
listener := newPeerStatusListener() | ||
serverOpts := testutils.NewOpts(). | ||
AddLogFilter("Skip closing idle Connection as it has pending calls.", 1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was looking over this and I initially thought that it would check and verify for this log message. It'd probably be great if we could do that as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
As documented in #701, we currently attempt closing connections even
if they have pending calls. This can cause issues if the calls is stuck
as the connection enters start-close, so it'll reject new incoming
calls, but it doesn't close, so the remote side keeps sending calls over
the same connection.
Fixes #701.