From 1dba36f9f5f0a352734d175152698f089c95b74f Mon Sep 17 00:00:00 2001 From: ssobolewski Date: Sun, 11 Feb 2018 17:19:58 -0700 Subject: [PATCH] 15 seconds was no way long enough for long running api calls --- server.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server.go b/server.go index 1f4ee7b..583ca24 100644 --- a/server.go +++ b/server.go @@ -147,11 +147,11 @@ func (s *server) ServeTLS(keyPath string, certPath string) error { Handler: s.router, Addr: s.address, // Good practice: enforce timeouts for servers you create! - WriteTimeout: 15 * time.Second, - ReadTimeout: 15 * time.Second, + WriteTimeout: 120 * time.Second, + ReadTimeout: 120 * time.Second, } - return srv.ListenAndServeTLS(keyPath, certPath) + return srv.ListenAndServeTLS(certPath,keyPath) } // Serve serve content forever @@ -160,8 +160,8 @@ func (s *server) Serve() error { Handler: s.router, Addr: s.address, // Good practice: enforce timeouts for servers you create! - WriteTimeout: 15 * time.Second, - ReadTimeout: 15 * time.Second, + WriteTimeout: 120 * time.Second, + ReadTimeout: 120 * time.Second, } return srv.ListenAndServe()