You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Problem
The remote connection through VSCode does not terminate the SSM session
on close consistently.
Note: We do not get an event when the remote window is closed.
## Solution
Leverage two best-effort approaches:
- only allow a single connection from the toolkit to any given EC2
Instance. If a customer attempts to open another remote window in an EC2
instance, we can use that as a sign to terminate the old session.
- on toolkit shutdown (deactivate), remote any sessions that are still
running.
## Implementation Details
- Implement `Ec2RemoteEnvManager` to manage the remote environments.
Behaves like a map of instance ids to sessions ids that most importantly
maintains the invariant that any deleted item has its session
terminated.
- Refactor `packages/core/src/awsService/ec2/commands.ts` and
`packages/core/src/awsService/ec2/activation.ts` to allow for state
tracking in `EC2ConnectionManager`. This change also gives us an
opportunity to improve the testing infrastructure for this code.
---
Co-authored-by: JadenSimon <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: Weinstock <[email protected]>
0 commit comments