Skip to content

Commit

Permalink
Remove HTTP and TFTP write timeouts
Browse files Browse the repository at this point in the history
These timeouts were disrupting downloads to slower
clients for larger proxied content.
  • Loading branch information
DSpeichert committed Sep 6, 2021
1 parent 2636b54 commit f6d1736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion httpd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func NewServer(store *store.Store) (server *Server, err error) {
server = &Server{
httpServer: &http.Server{
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
IdleTimeout: 10 * time.Second,
},
Expand Down
9 changes: 3 additions & 6 deletions tftpd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/rs/zerolog/log"
"net"
"net/http"
"time"
)

type Server struct {
Expand All @@ -21,11 +20,9 @@ type Server struct {
func NewServer(store *store.Store) (server *Server, err error) {

server = &Server{
httpClient: &http.Client{
Timeout: time.Second * 30,
},
logger: log.With().Str("service", "tftp").Logger(),
store: store,
httpClient: &http.Client{},
logger: log.With().Str("service", "tftp").Logger(),
store: store,
}

return server, nil
Expand Down

0 comments on commit f6d1736

Please sign in to comment.