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

Do not hold on to pending channels after close. #38

Merged
merged 1 commit into from
Aug 14, 2020
Merged

Do not hold on to pending channels after close. #38

merged 1 commit into from
Aug 14, 2020

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Aug 14, 2020

Motivation:

We temporarily store channel creation requests in NIOSSHHandler before
passing them to the multiplexer while we wait for the handshake to
complete. This is fine, but if for any reason we get removed from the
pipeline while we're still holding some, they must all be cancelled.

Modifications:

  • Correctly cancel creation requests on handlerRemoved.
  • Verify behaviour in tests.

Result:

Fewer hangs on channel creation.

Actually fixes #36.

Motivation:

We temporarily store channel creation requests in NIOSSHHandler before
passing them to the multiplexer while we wait for the handshake to
complete. This is fine, but if for any reason we get removed from the
pipeline while we're still holding some, they must all be cancelled.

Modifications:

- Correctly cancel creation requests on handlerRemoved.
- Verify behaviour in tests.

Result:

Fewer hangs on channel creation.
@Lukasa Lukasa merged commit 53a61d1 into apple:main Aug 14, 2020
artemredkin pushed a commit to artemredkin/swift-nio-ssh that referenced this pull request Feb 19, 2021
Motivation:

We temporarily store channel creation requests in NIOSSHHandler before
passing them to the multiplexer while we wait for the handshake to
complete. This is fine, but if for any reason we get removed from the
pipeline while we're still holding some, they must all be cancelled.

Modifications:

- Correctly cancel creation requests on handlerRemoved.
- Verify behaviour in tests.

Result:

Fewer hangs on channel creation.
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.

createChannel on inactive channel is not failed
2 participants