mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: wait for server tailnet background routines to exit on Close (#15183)
fixes https://github.com/coder/internal/issues/114 We need to wait for ServerTailnet goroutines to finish when closing down, otherwise we can race with the shutdown of coderd & the coordinator, which causes errors.
This commit is contained in:
@@ -419,6 +419,8 @@ func (s *Server) RegisterNow() error {
|
||||
}
|
||||
|
||||
func (s *Server) Close() error {
|
||||
s.Logger.Info(s.ctx, "closing workspace proxy server")
|
||||
defer s.Logger.Debug(s.ctx, "finished closing workspace proxy server")
|
||||
s.cancel()
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user