Skip to content

Commit

Permalink
take the http timeout value from env
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjanap committed Feb 12, 2022
1 parent 25bb312 commit 72b37d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func (app *App) Initialize(routeSpecifiers []RouteSpecifier) {

app.server = &http.Server{
Addr: "0.0.0.0:80",
WriteTimeout: time.Second * 15,
ReadTimeout: time.Second * 15,
IdleTimeout: time.Second * 60,
WriteTimeout: time.Second * time.Duration(app.Config.GetInt("HTTP_WRITE_TIMEOUT")),
ReadTimeout: time.Second * time.Duration(app.Config.GetInt("HTTP_READ_TIMEOUT")),
IdleTimeout: time.Second * time.Duration(app.Config.GetInt("HTTP_IDLE_TIMEOUT")),
Handler: app.Router,
}
}
Expand Down

0 comments on commit 72b37d6

Please sign in to comment.