mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: shutdown provisioner should stop waiting on client (#13118)
* chore: shutdown provisioner should stop waiting on client * chore: add unit test that replicates failed client conn
This commit is contained in:
@@ -239,6 +239,12 @@ func (r *RootCmd) provisionerDaemonStart() *serpent.Command {
|
||||
return xerrors.Errorf("shutdown: %w", err)
|
||||
}
|
||||
|
||||
// Shutdown does not call close. Must call it manually.
|
||||
err = srv.Close()
|
||||
if err != nil {
|
||||
return xerrors.Errorf("close server: %w", err)
|
||||
}
|
||||
|
||||
cancel()
|
||||
if xerrors.Is(exitErr, context.Canceled) {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user