linting
This commit is contained in:
@@ -156,8 +156,9 @@ func (a *App[T]) Start() error {
|
||||
}
|
||||
|
||||
a.metricsSrv = &http.Server{
|
||||
Addr: addr,
|
||||
Handler: router,
|
||||
Addr: addr,
|
||||
Handler: router,
|
||||
ReadHeaderTimeout: 5 * time.Second,
|
||||
}
|
||||
go func() {
|
||||
a.logger.Info("Prometheus metrics server starting", zap.String("address", addr))
|
||||
@@ -185,7 +186,7 @@ func (a *App[T]) Start() error {
|
||||
}
|
||||
a.logger.Debug("GRPC services registered")
|
||||
|
||||
a.runCtx, a.cancel = context.WithCancel(context.Background())
|
||||
a.runCtx, a.cancel = context.WithCancel(context.Background()) //nolint:gosec // Cancellation func is retained on app state and invoked on Shutdown.
|
||||
a.logger.Debug("GRPC server context initialised")
|
||||
|
||||
if err := a.grpc.Start(a.runCtx); err != nil {
|
||||
@@ -219,9 +220,6 @@ func (a *App[T]) Start() error {
|
||||
}
|
||||
|
||||
func (a *App[T]) Shutdown(ctx context.Context) {
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
if a.cancel != nil {
|
||||
a.cancel()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user