Skip to content

feat: replace vscodeipc with vscodessh #5645

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

Merged
merged 5 commits into from
Jan 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix connection tracking
  • Loading branch information
kylecarbs committed Jan 10, 2023
commit 10a5af2b3ec3acd2a13fb3ef3275c468fa89ef95
18 changes: 9 additions & 9 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,22 +298,22 @@ func (a *agent) createTailnet(ctx context.Context, derpMap *tailcfg.DERPMap) (_
_ = sshListener.Close()
}
}()
if err = a.trackConnGoroutine(func() {
select {
case <-network.Closed():
case <-a.closed:
}
_ = sshListener.Close()
}); err != nil {
return nil, err
}
if err = a.trackConnGoroutine(func() {
for {
conn, err := sshListener.Accept()
if err != nil {
return
}
closed := make(chan struct{})
_ = a.trackConnGoroutine(func() {
select {
case <-network.Closed():
case <-closed:
}
_ = conn.Close()
})
_ = a.trackConnGoroutine(func() {
defer close(closed)
a.sshServer.HandleConn(conn)
})
}
Expand Down