net/http: idle timeout added in CL 121419 is undocumented and surprising #59037
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
CL 121419 changed
net/http.Server
to treat new connections as idle after 5 seconds, in order to unblockShutdown
with stalled connections (see #22682). That behavior has a regression test, but I find it surprising and I don't see it mentioned in thenet/http
documentation at all.I would intuitively expect one of two other behaviors:
closeIdleConns
could use the configuredReadHeaderTimeout
for this purpose, as suggested in net/http: Server closeIdleConns does not close StateNew connections #22682 (comment).Shutdown
could instead causecloseIdleConns
to close all connections inStateNew
, regardless of how long they have been in that state.(attn @neild; CC @bradfitz @tombergan)
The text was updated successfully, but these errors were encountered: