Skip to content

Commit f6d1736

Browse files
committed
Remove HTTP and TFTP write timeouts
These timeouts were disrupting downloads to slower clients for larger proxied content.
1 parent 2636b54 commit f6d1736

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

httpd/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func NewServer(store *store.Store) (server *Server, err error) {
2222
server = &Server{
2323
httpServer: &http.Server{
2424
ReadTimeout: 10 * time.Second,
25-
WriteTimeout: 10 * time.Second,
2625
MaxHeaderBytes: 1 << 20,
2726
IdleTimeout: 10 * time.Second,
2827
},

tftpd/server.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/rs/zerolog/log"
88
"net"
99
"net/http"
10-
"time"
1110
)
1211

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

2322
server = &Server{
24-
httpClient: &http.Client{
25-
Timeout: time.Second * 30,
26-
},
27-
logger: log.With().Str("service", "tftp").Logger(),
28-
store: store,
23+
httpClient: &http.Client{},
24+
logger: log.With().Str("service", "tftp").Logger(),
25+
store: store,
2926
}
3027

3128
return server, nil

0 commit comments

Comments
 (0)