Skip to content

Commit 99e50a4

Browse files
authored
Revert "chore(api): disable request timeout (#2156)"
This reverts commit e236dcc.
1 parent b270ce9 commit 99e50a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/api/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const (
6363
// Must be less than maxWriteTimeout so the context cancels before the
6464
// server's write deadline kills the connection (WriteTimeout does NOT
6565
// cancel r.Context(); see https://github.com/golang/go/issues/59602).
66-
// requestTimeout = 60 * time.Second
66+
requestTimeout = 60 * time.Second
6767

6868
// This timeout should be > 600 (GCP LB upstream idle timeout) to prevent race condition
6969
// https://cloud.google.com/load-balancing/docs/https#timeouts_and_retries%23:~:text=The%20load%20balancer%27s%20backend%20keepalive,is%20greater%20than%20600%20seconds
@@ -133,7 +133,7 @@ func NewGinServer(ctx context.Context, config cfg.Config, tel *telemetry.Client,
133133
},
134134
}),
135135
gin.Recovery(),
136-
// customMiddleware.RequestTimeout(requestTimeout), //nolint:contextcheck // Gin middleware sets context via c.Request.WithContext
136+
customMiddleware.RequestTimeout(requestTimeout), //nolint:contextcheck // Gin middleware sets context via c.Request.WithContext
137137
)
138138

139139
corsConfig := cors.DefaultConfig()

0 commit comments

Comments
 (0)