diff options
author | Valery Piashchynski <[email protected]> | 2019-11-17 18:13:15 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2019-11-17 18:13:15 +0300 |
commit | a7982f6e692e9dc40f035d5f1486cb2bbae71f88 (patch) | |
tree | ab4b32c190bc8bffd9b1b99b806e03192729c59a /service/health/service.go | |
parent | c463235f55cdae5fa7c63a87e7cc73c6e535d27a (diff) |
finish the check
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)) + } + }() } } |