8000 fix(agent/agentssh): wait for sessions to exit (#8008) · coder/coder@74fdcb1 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-99b04cc350b5.js" defer="defer">

Commit 74fdcb1

Browse files
authored
fix(agent/agentssh): wait for sessions to exit (#8008)
1 parent 794a551 commit 74fdcb1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

agent/agentssh/agentssh.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,11 @@ func (s *Server) trackSession(ss ssh.Session, add bool) (ok bool) {
648648
// Server closed.
649649
return false
650650
}
651+
s.wg.Add(1)
651652
s.sessions[ss] = struct{}{}
652653
return true
653654
}
655+
s.wg.Done()
654656
delete(s.sessions, ss)
655657
return true
656658
}

0 commit comments

Comments
 (0)
0