From 21e2e5479521fec8bf421fd715267c9ab12404e7 Mon Sep 17 00:00:00 2001 From: jayvenn21 Date: Tue, 10 Feb 2026 11:14:37 -0500 Subject: [PATCH] docs: add reason callback is stored with connection per review --- docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md index 6ad9a5050f..3de339e49b 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md @@ -54,7 +54,10 @@ When using the multi interface, the close socket callback is invoked when libcurl closes a socket it owns. The callback and CURLOPT_CLOSESOCKETDATA(3) are copied from the *first* easy handle that creates the connection; changing this option on a subsequent easy handle that reuses the same -connection has no effect for that connection. +connection has no effect for that connection. The callback is stored with +the connection because the connection may outlive the easy handle that +created it, so that libcurl can still invoke it when the connection is +closed even after that handle has been cleaned up. # DEFAULT