Explorar o código

fix default grpc-gateway connect timeout (#3142)

Liam Hao %!s(int64=2) %!d(string=hai) anos
pai
achega
bf905eaff3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      gateway/server.go

+ 1 - 0
gateway/server.go

@@ -38,6 +38,7 @@ func MustNewServer(c GatewayConf, opts ...Option) *Server {
 	svr := &Server{
 		Server:    rest.MustNewServer(c.RestConf),
 		upstreams: c.Upstreams,
+		timeout:   time.Duration(c.Timeout) * time.Millisecond,
 	}
 	for _, opt := range opts {
 		opt(svr)