Skip to content

Commit 74fdcb1

Browse files
authored
fix(agent/agentssh): wait for sessions to exit (coder#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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy