Skip to content

Commit

Permalink
fix data race
Browse files Browse the repository at this point in the history
  • Loading branch information
antonvakhmistrov committed Dec 1, 2023
1 parent acd074c commit bd9c188
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/command/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ func NewHTTPServer(ctn di.Container) *cobra.Command {
logger.Info("Starting HTTP server", zap.String("addr", addr))

go func() {
if err = e.Start(addr); err != nil {
logger.Info("Gracefully shutting down the HTTP server")
if runErr := e.Start(addr); runErr != nil {
logger.
With(zap.Error(runErr)).
Info("Shutting down the HTTP server")
}
}()

Expand Down

0 comments on commit bd9c188

Please sign in to comment.