Skip to content

Commit

Permalink
No HTTP timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Feb 19, 2024
1 parent c2a04da commit 9aabb94
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions node/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"net/http/pprof"
"strconv"
"strings"
"time"

"github.com/NethermindEth/juno/db"
junogrpc "github.com/NethermindEth/juno/grpc"
Expand Down Expand Up @@ -54,11 +53,8 @@ func makeHTTPService(host string, port uint16, handler http.Handler) *httpServic
portStr := strconv.FormatUint(uint64(port), 10)
return &httpService{
srv: &http.Server{
Addr: net.JoinHostPort(host, portStr),
Handler: handler,
ReadHeaderTimeout: 30 * time.Second,
IdleTimeout: 30 * time.Second,
ReadTimeout: time.Minute,
Addr: net.JoinHostPort(host, portStr),
Handler: handler,
},
}
}
Expand Down

0 comments on commit 9aabb94

Please sign in to comment.