diff --git a/http.go b/http.go index dcd53ec..a9677a1 100644 --- a/http.go +++ b/http.go @@ -4,7 +4,6 @@ import ( "context" "crypto/tls" "net/http" - "time" "github.com/gin-gonic/gin" "github.com/pelletier/go-toml" @@ -94,8 +93,7 @@ func (s *Server) UseAuthBackend(a auth.AuthenticationHandler) { } // Stop Shuts the Server down -func (s *Server) Stop() { - ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(time.Second*5)) +func (s *Server) Stop(ctx context.Context) { go func() { log.Info().Err(s.http.Shutdown(ctx)).Msg("Server Shut down.") }()