diff options
Diffstat (limited to 'service/health/service.go')
-rw-r--r-- | service/health/service.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/service/health/service.go b/service/health/service.go index c0be68e0..a730de7e 100644 --- a/service/health/service.go +++ b/service/health/service.go @@ -2,6 +2,7 @@ package health import ( "context" + "fmt" "net/http" "sync" @@ -47,7 +48,13 @@ func (s *Service) Stop() { if s.http != nil { // gracefully stop the server - go s.http.Shutdown(context.Background()) + go func() { + err := s.http.Shutdown(context.Background()) + if err != nil { + // TODO how to log error here? + fmt.Println(fmt.Errorf("error shutting down the server: error %v", err)) + } + }() } } |