Skip to content

Commit

Permalink
fix(grpc/gateway_server): remove http.TimeoutHandler from gateway server
Browse files Browse the repository at this point in the history
  • Loading branch information
bradub committed Nov 16, 2023
1 parent 8fd9972 commit 1661a53
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions grpc/gateway_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ func (s *gatewayServer) close() error {

// nolint: revive // false-positive, it reports tracing as a control flag.
func newGatewayServer(
muxOptions []runtime.ServeMuxOption,
tracing bool,
registerGateway registerGatewayFunc,
address string,
httpRoutes []httpRoute,
middlewares chi.Middlewares,
debugStandardLibraryEndpoints bool,
corsOptions cors.Options,
muxOptions []runtime.ServeMuxOption,

Check failure on line 54 in grpc/gateway_server.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
tracing bool,
registerGateway registerGatewayFunc,
address string,
httpRoutes []httpRoute,
middlewares chi.Middlewares,
debugStandardLibraryEndpoints bool,
corsOptions cors.Options,
) (
*gatewayServer,
error,
*gatewayServer,

Check failure on line 63 in grpc/gateway_server.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
error,
) {
grpcGatewayMux := runtime.NewServeMux(
muxOptions...,
Expand Down Expand Up @@ -133,11 +133,7 @@ func newGatewayServer(

return &gatewayServer{
httpServer: &http.Server{
Handler: http.TimeoutHandler(
router,
handlerTimeout,
"",
),
Handler: router,
ReadTimeout: readTimeout,
ReadHeaderTimeout: readHeaderTimeout,
WriteTimeout: writeTimeout,
Expand Down

0 comments on commit 1661a53

Please sign in to comment.