Skip to content

Commit fc7d211

Browse files
authored
Merge pull request #156 from kubescape/fix/networkstream-read-timeout
fix(httpendpoint): increase ReadTimeout for large network stream payloads
2 parents eafb722 + b166bff commit fc7d211

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

adapters/httpendpoint/v1/adapter.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ func NewHTTPEndpointAdapter(cfg config.Config) *Adapter {
3636
})
3737

3838
server := &http.Server{
39-
Addr: fmt.Sprintf(":%s", cfg.HTTPEndpoint.ServerPort),
40-
ReadTimeout: 5 * time.Second,
41-
WriteTimeout: 10 * time.Second,
42-
IdleTimeout: 120 * time.Second,
43-
Handler: httpMux,
39+
Addr: fmt.Sprintf(":%s", cfg.HTTPEndpoint.ServerPort),
40+
ReadHeaderTimeout: 5 * time.Second,
41+
ReadTimeout: 30 * time.Second,
42+
WriteTimeout: 35 * time.Second,
43+
IdleTimeout: 120 * time.Second,
44+
Handler: httpMux,
4445
}
4546
a := &Adapter{
4647
cfg: cfg,

0 commit comments

Comments
 (0)