-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
transport: remove RequireHandshakeHybrid support #2529
Conversation
a546d75
to
c5923c5
Compare
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 but there might be room to delete even more!
clientconn.go
Outdated
@@ -1229,6 +1163,22 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne | |||
return nil, err | |||
} | |||
|
|||
if ac.dopts.reqHandshake == envconfig.RequireHandshakeOn { | |||
select { | |||
case <-prefaceTimer.C: |
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.
We shouldn't still need a prefaceTimer, right? We should be able to just use the normal connect deadline here I think. And we can eliminate prefaceReceived, too, if we make NewClientTransport itself block until the preface is received. That should simplify things even more.
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.
- prefaceTimer: removed
- onPrefaceReceipt: do you mind if I do that in a separate PR?
@jadekler I think I'll send a minimal PR to disable this feature for the release tomorrow to reduce risk, and we can hold this PR until after. SG? |
That SGTM. |
And per #2406 we aren't supposed to remove this support until the 1.19 release anyway, so I actually just re-stated the official plan. |
1e08f17
to
a195f7c
Compare
There an unused import making travis fail; can you fix it please? |
1aff12e
to
9773b38
Compare
Shoot. Sorry. Done, and rebased. |
This removes RequireHandshakeHybrid support and changes the default behavior to RequireHandshakeOn. Dial calls will now block and wait for a successful handshake before proceeding. Users relying on the old hybrid behavior (cmux users) should consult soheilhy/cmux#64. Also, several tests have been updated to take this into consideration by sending settings frames.
9773b38
to
4207789
Compare
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.
LGTM but let's delay this until after today's release. We theoretically should remove the hybrid mode support in today's release, but going a little slower than planned to remove a feature is better than rushing a CL in right before a release.
SGTM. |
This removes RequireHandshakeHybrid support and changes the default behavior
to RequireHandshakeOn. Dial calls will now block and wait for a successful
handshake before proceeding. Users relying on the old hybrid behavior (cmux
users) should consult soheilhy/cmux#64.
Also, several tests have been updated to take this into consideration by
sending settings frames.