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