Fix panic when stopping the nats

This commit is contained in:
Roman Perekhod
2024-10-21 18:17:50 +02:00
parent d5aea1e64a
commit 1ef9b21e7f
5 changed files with 14 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ func Server(cfg *config.Config) *cli.Command {
return err
}
gr.Add(func() error {
err := make(chan error)
err := make(chan error, 1)
select {
case <-ctx.Done():
return nil