summaryrefslogtreecommitdiff
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go
index cd63820..9ea6833 100644
--- a/server/server.go
+++ b/server/server.go
@@ -20,7 +20,7 @@ type HTTPServer struct {
// ShutdownTimeout is the amount of time to gracefully shutdown, defaults
// to 5 seconds. Should be less than the supervisor's Timeout.
- ShutdownTimeout *time.Duration
+ ShutdownTimeout time.Duration
}
// Serve starts the [http.Server] returned by NewServer. The function blocks until the HTTP server
@@ -41,7 +41,7 @@ func (s *HTTPServer) Serve(ctx context.Context) error {
case <-ctx.Done():
}
- timeout := cmp.Or(*s.ShutdownTimeout, 5*time.Second)
+ timeout := cmp.Or(s.ShutdownTimeout, 5*time.Second)
shutdownCtx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()