node, rpc: add ReadHeaderTimeout config option (#25338)
This change makes http.Server.ReadHeaderTimeout configurable separately from ReadTimeout for RPC servers. The default is set to the same as ReadTimeout, which in order to cause no change in existing deployments.
This commit is contained in:
1 parent
d804a59ee1
commit
9244f87dc1
3 files changed
+22
-7
No files matched your search
@@ -134,6 +134,7 @@ func (h *httpServer) start() error {
|
||||
if h.timeouts != (rpc.HTTPTimeouts{}) {
|
||||
CheckTimeouts(&h.timeouts)
|
||||
h.server.ReadTimeout = h.timeouts.ReadTimeout
|
||||
h.server.ReadHeaderTimeout = h.timeouts.ReadHeaderTimeout
|
||||
h.server.WriteTimeout = h.timeouts.WriteTimeout
|
||||
h.server.IdleTimeout = h.timeouts.IdleTimeout
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user