Skip to content
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

Trigger channel read for TLS handshake only on the server-side #2713

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

SslHandler automatically initiates the handshake and manages reads on the client-side. We need to initiate read only on the server-side.

Modifications:

  • DefaultNettyConnection.doChannelActive read only if !isClient;
  • Assert that channel is active when AlpnChannelHandler or SniCompleteChannelHandler are added and the read is forced;

Result:

No unnecessary read on client-side channels.

Motivation:

`SslHandler` automatically initiates the handshake and manages reads on
the client-side. We need to initiate read only on the server-side.

Modifications:

- `DefaultNettyConnection.doChannelActive` read only if `!isClient`;
- Assert that channel is active when `AlpnChannelHandler` or
`SniCompleteChannelHandler` are added and the read is forced;

Result:

No unnecessary read on client-side channels.
@idelpivnitskiy idelpivnitskiy merged commit ee7db1e into apple:main Oct 2, 2023
15 checks passed
@idelpivnitskiy idelpivnitskiy deleted the read branch October 2, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants