From d02445f49d7d27ef08ffdfc79293ae135ebf6c22 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Thu, 19 Mar 2026 16:46:17 +0100 Subject: [PATCH 1/4] Update SP&SPM docs --- xml/System.Net/ServicePoint.xml | 6 +++++- xml/System.Net/ServicePointManager.xml | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xml/System.Net/ServicePoint.xml b/xml/System.Net/ServicePoint.xml index 449581a51b8..7312b2560ec 100644 --- a/xml/System.Net/ServicePoint.xml +++ b/xml/System.Net/ServicePoint.xml @@ -537,6 +537,8 @@ Although a object can make multiple connections t The property sets the maximum number of connections that the object can make to an Internet resource. The value of the property is set to the value of the property when the object is created; subsequent changes to have no effect on existing objects. + The connection limit does not apply to proxied connections nor proxy tunnels. + > [!NOTE] > Since .NET 9, this property maps to . However, handlers are not being reused between requests so it doesn't have any meaningful impact. @@ -1150,7 +1152,9 @@ The `GetHashCode` method returns a hash code of this instance. This value can be The default settings when a TCP socket is initialized sets the keep-alive timeout to 2 hours and the keep-alive interval to 1 second. The `keepAliveTime` parameter specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent. The `keepAliveInterval` parameter specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received. The number of keep-alive probes cannot be changed and is set to 10. - If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of . + If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of . + + This method is not thread-safe. Any new connection created at the same time might see partially changed values for the TCP keep-alive. > [!NOTE] > Since .NET 9, uses to set TCP keep alive options on the underlying socket to the values provided to this method. diff --git a/xml/System.Net/ServicePointManager.xml b/xml/System.Net/ServicePointManager.xml index eabe8225fa0..2abe5449e94 100644 --- a/xml/System.Net/ServicePointManager.xml +++ b/xml/System.Net/ServicePointManager.xml @@ -999,7 +999,7 @@ property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. + When you reduce the property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances is requested, will throw. As a result, s leading to new, distinct enpoints will fail. > [!NOTE] > This property is only implemented on .NET Framework. @@ -1280,6 +1280,8 @@ Each callback returns a value that indicates whether the certificate is accepted If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of . + This method is not thread-safe. Any created at the same time might see partially changed values for the TCP keep-alive. + > [!NOTE] > Since .NET 9, uses to set TCP keep alive options on the underlying socket to the values provided to this method. From 9ea51de201917f60d715f37858869b6c1f22f605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Fri, 20 Mar 2026 11:11:03 +0100 Subject: [PATCH 2/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- xml/System.Net/ServicePointManager.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/ServicePointManager.xml b/xml/System.Net/ServicePointManager.xml index 2abe5449e94..643d3a65841 100644 --- a/xml/System.Net/ServicePointManager.xml +++ b/xml/System.Net/ServicePointManager.xml @@ -999,7 +999,7 @@ property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances is requested, will throw. As a result, s leading to new, distinct enpoints will fail. + When you reduce the property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances is requested, will throw. As a result, s leading to new, distinct endpoints will fail. > [!NOTE] > This property is only implemented on .NET Framework. From 5675cce00ef43ed37ca66e8e778b918a03514109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Fri, 20 Mar 2026 11:13:05 +0100 Subject: [PATCH 3/4] Apply suggestion from @ManickaP --- xml/System.Net/ServicePointManager.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/ServicePointManager.xml b/xml/System.Net/ServicePointManager.xml index 643d3a65841..50ddba96017 100644 --- a/xml/System.Net/ServicePointManager.xml +++ b/xml/System.Net/ServicePointManager.xml @@ -999,7 +999,7 @@ property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances is requested, will throw. As a result, s leading to new, distinct endpoints will fail. + When you reduce the property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances are requested, will throw. As a result, s leading to new, distinct endpoints will fail. > [!NOTE] > This property is only implemented on .NET Framework. From 3d179efc69d63b49183122d86d8e70fd374dc8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:56:21 +0100 Subject: [PATCH 4/4] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com> --- xml/System.Net/ServicePoint.xml | 2 +- xml/System.Net/ServicePointManager.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Net/ServicePoint.xml b/xml/System.Net/ServicePoint.xml index 7312b2560ec..ba8e3681f79 100644 --- a/xml/System.Net/ServicePoint.xml +++ b/xml/System.Net/ServicePoint.xml @@ -1152,7 +1152,7 @@ The `GetHashCode` method returns a hash code of this instance. This value can be The default settings when a TCP socket is initialized sets the keep-alive timeout to 2 hours and the keep-alive interval to 1 second. The `keepAliveTime` parameter specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent. The `keepAliveInterval` parameter specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received. The number of keep-alive probes cannot be changed and is set to 10. - If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of . + If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of . This method is not thread-safe. Any new connection created at the same time might see partially changed values for the TCP keep-alive. diff --git a/xml/System.Net/ServicePointManager.xml b/xml/System.Net/ServicePointManager.xml index 50ddba96017..5583800b0af 100644 --- a/xml/System.Net/ServicePointManager.xml +++ b/xml/System.Net/ServicePointManager.xml @@ -999,7 +999,7 @@ property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances are requested, will throw. As a result, s leading to new, distinct endpoints will fail. + When you reduce the property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle. If this limit is set and more distinct instances are requested, will throw. As a result, s leading to new, distinct endpoints will fail. > [!NOTE] > This property is only implemented on .NET Framework.