mirror of
https://github.com/curl/curl.git
synced 2026-07-03 06:27:17 +03:00
docs: warn about lifetime in CURLOPT_CLOSESOCKET*
Callback and data set via CURLOPT_CLOSESOCKETFUNCTION and CURLOPT_CLOSESOCKETDATA may get used after the easy handle has been cleaned up. Inform about that. Closes #17816
This commit is contained in:
parent
bed49a0462
commit
d9c2d4bc10
2 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue