Skip to content

Commit

Permalink
home: imp names
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Feb 15, 2021
1 parent b18d7b0 commit 84229b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions internal/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ func run(args options) {
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort,

ReadTimeout: ReadTimeout,
ReadHeaderTimeout: ReadHeaderTimeout,
WriteTimeout: WriteTimeout,
ReadTimeout: readTimeout,
ReadHeaderTimeout: readHdrTimeout,
WriteTimeout: writeTimeout,
}
Context.web = CreateWeb(&webConf)
if Context.web == nil {
Expand Down
15 changes: 6 additions & 9 deletions internal/home/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ import (
)

const (
// ReadTimeout is the maximum duration for reading the entire request,
// readTimeout is the maximum duration for reading the entire request,
// including the body.
ReadTimeout = 30 * time.Second

// ReadHeaderTimeout is the amount of time allowed to read request
// headers.
ReadHeaderTimeout = 30 * time.Second

// WriteTimeout is the maximum duration before timing out writes of the
readTimeout = 30 * time.Second
// readHdrTimeout is the amount of time allowed to read request headers.
readHdrTimeout = 30 * time.Second
// writeTimeout is the maximum duration before timing out writes of the
// response.
WriteTimeout = 30 * time.Second
writeTimeout = 30 * time.Second
)

type webConfig struct {
Expand Down

0 comments on commit 84229b7

Please sign in to comment.