-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue
Milestone
Description
From RFC 2616:
When a client or server wishes to time-out it SHOULD issue a graceful
close on the transport connection. Clients and servers SHOULD both
constantly watch for the other side of the transport close, and
respond to it as appropriate. If a client or server does not detect
the other side's close promptly it could cause unnecessary resource
drain on the network.
SocketsHttpHandler does not do this currently. We do issue a "read-ahead" read on idle connections, and we do close the connection during scavenging if we detect (via the read-ahead) that the server has closed the connection. But scavenging only happens periodically.
We could instead close the connection immediately when the read-ahead completes (and the connection is not in use). This seems more in line with the spirit of the RFC above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue