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

No creating SSH channels after disconnect. #41

Merged
merged 1 commit into from
Aug 19, 2020
Merged

No creating SSH channels after disconnect. #41

merged 1 commit into from
Aug 19, 2020

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Aug 19, 2020

Motivation:

If the channel has been disconnected, we should forbid any attempt to
create an SSH channel. While we have a number of ways to catch this, in
some weirder environments it's possible none of them succeed, so let's
take a wider view of how to create these channels by preventing them
being created as early as possible as well.

Modifications:

  • Change early-exit guard to only fire during the first handshake.
  • If we are in the disconnected state, drop channel creation
    immediately.

Result:

Better defense against losing channel creation events.

Motivation:

If the channel has been disconnected, we should forbid any attempt to
create an SSH channel. While we have a number of ways to catch this, in
some weirder environments it's possible none of them succeed, so let's
take a wider view of how to create these channels by preventing them
being created as early as possible as well.

Modifications:

- Change early-exit guard to only fire during the first handshake.
- If we are in the disconnected state, drop channel creation
  immediately.

Result:

Better defense against losing channel creation events.
@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Aug 19, 2020
@Lukasa Lukasa merged commit d55e8bb into apple:main Aug 19, 2020
@Lukasa Lukasa deleted the cb-channel-after-inactive branch August 19, 2020 13:10
artemredkin pushed a commit to artemredkin/swift-nio-ssh that referenced this pull request Feb 19, 2021
Motivation:

If the channel has been disconnected, we should forbid any attempt to
create an SSH channel. While we have a number of ways to catch this, in
some weirder environments it's possible none of them succeed, so let's
take a wider view of how to create these channels by preventing them
being created as early as possible as well.

Modifications:

- Change early-exit guard to only fire during the first handshake.
- If we are in the disconnected state, drop channel creation
  immediately.

Result:

Better defense against losing channel creation events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants