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:
Steven Masley
2024-05-03 10:15:17 -05:00
committed by GitHub
parent 94a3e3a563
commit 09f00c08df
3 changed files with 41 additions and 0 deletions
+6
View File
@@ -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