Procházet zdrojové kódy

Increase read/write timeout for HTTP server

Frédéric Guillot před 8 roky
rodič
revize
4cdb2f820b
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      daemon/server.go

+ 2 - 2
daemon/server.go

@@ -25,8 +25,8 @@ func newServer(cfg *config.Config, store *storage.Storage, pool *scheduler.Worke
 	certDomain := cfg.CertDomain()
 	certCache := cfg.CertCache()
 	server := &http.Server{
-		ReadTimeout:  5 * time.Second,
-		WriteTimeout: 10 * time.Second,
+		ReadTimeout:  30 * time.Second,
+		WriteTimeout: 30 * time.Second,
 		IdleTimeout:  60 * time.Second,
 		Addr:         cfg.ListenAddr(),
 		Handler:      routes(cfg, store, feedHandler, pool, translator),