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

Key exchange should be initialized on handlerAdded as well #42

Closed
artemredkin opened this issue Aug 28, 2020 · 0 comments · Fixed by #43
Closed

Key exchange should be initialized on handlerAdded as well #42

artemredkin opened this issue Aug 28, 2020 · 0 comments · Fixed by #43
Assignees
Labels
enhancement New feature or request

Comments

@artemredkin
Copy link
Contributor

Sometimes we already have an established channel, for example,
one returned by establishing a tunneled connection. If this
is the case, then we cannot use it to start key exchange, since
it's only started when channel becomes active. In order to
support more use cases we should handle starting key exchange
when handler is added as well.

@artemredkin artemredkin added the enhancement New feature or request label Aug 28, 2020
@artemredkin artemredkin self-assigned this Aug 28, 2020
@Lukasa Lukasa closed this as completed in #43 Sep 7, 2020
Lukasa pushed a commit that referenced this issue Sep 7, 2020
Motivation:
Sometimes we already have an established channel, for example,
one returned by establishing a tunneled connection. If this
is the case, then we cannot use it to start key exchange, since
it's only started when channel becomes active. In order to
support more use cases we should handle starting key exchange
when handler is added as well.

Modifications:
1. Extract key exchange initialization to separate function
2. Call it from handlerAdded if channel is active
3. Guard againts calling it twice

Result:
Fixes #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant