mirror of
https://github.com/zitadel/zitadel.git
synced 2025-07-15 18:08:35 +00:00
add WriteTimeout
This commit is contained in:
parent
498542c983
commit
ccab1a346a
@ -561,11 +561,12 @@ func startAPIs(
|
|||||||
type test struct {
|
type test struct {
|
||||||
IdleTimeout time.Duration
|
IdleTimeout time.Duration
|
||||||
ReadTimeout time.Duration
|
ReadTimeout time.Duration
|
||||||
|
WriteTimeout time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
func listen(ctx context.Context, router *mux.Router, port uint16, tlsConfig *tls.Config, shutdown <-chan os.Signal, test test) error {
|
func listen(ctx context.Context, router *mux.Router, port uint16, tlsConfig *tls.Config, shutdown <-chan os.Signal, test test) error {
|
||||||
http2Server := &http2.Server{IdleTimeout: test.IdleTimeout}
|
http2Server := &http2.Server{IdleTimeout: test.IdleTimeout}
|
||||||
http1Server := &http.Server{Handler: h2c.NewHandler(router, http2Server), TLSConfig: tlsConfig, ReadTimeout: test.ReadTimeout, IdleTimeout: test.IdleTimeout}
|
http1Server := &http.Server{Handler: h2c.NewHandler(router, http2Server), TLSConfig: tlsConfig, ReadTimeout: test.ReadTimeout, IdleTimeout: test.IdleTimeout, WriteTimeout: test.WriteTimeout}
|
||||||
|
|
||||||
lc := net.ListenConfig()
|
lc := net.ListenConfig()
|
||||||
lis, err := lc.Listen(ctx, "tcp", fmt.Sprintf(":%d", port))
|
lis, err := lc.Listen(ctx, "tcp", fmt.Sprintf(":%d", port))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user