mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
fix(agent/agentssh): wait for sessions to exit (#8008)
This commit is contained in:
committed by
GitHub
parent
794a551176
commit
74fdcb1ace
@@ -648,9 +648,11 @@ func (s *Server) trackSession(ss ssh.Session, add bool) (ok bool) {
|
||||
// Server closed.
|
||||
return false
|
||||
}
|
||||
s.wg.Add(1)
|
||||
s.sessions[ss] = struct{}{}
|
||||
return true
|
||||
}
|
||||
s.wg.Done()
|
||||
delete(s.sessions, ss)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user