diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.md b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.md index 3ad41d0b07..a1bdd9c3fe 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.md +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.md @@ -31,6 +31,11 @@ Pass a *pointer* that remains untouched by libcurl and passed as the first argument in the closesocket callback set with CURLOPT_CLOSESOCKETFUNCTION(3). +Note that when using multi/share handles, your callback may get invoked even +after the easy handle has been cleaned up. The callback and data is +inherited by a new connection and that connection may live longer +than the transfer itself in the multi/share handle's connection cache. + # DEFAULT NULL diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md index 532aaf19df..7f1bf592dc 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.md @@ -42,6 +42,11 @@ The *clientp* pointer is set with CURLOPT_CLOSESOCKETDATA(3). *item* is the socket libcurl wants to be closed. +Note that when using multi/share handles, your callback may get invoked even +after the easy handle has been cleaned up. The callback and data is +inherited by a new connection and that connection may live longer +than the transfer itself in the multi/share handle's connection cache. + # DEFAULT Use the standard socket close function.