15 seconds was no way long enough for long running api calls

This commit is contained in:
ssobolewski 2018-02-11 17:19:58 -07:00
parent fabbb6a52c
commit 1dba36f9f5
1 changed files with 5 additions and 5 deletions

View File

@ -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()