]> granicus.if.org Git - curl/commitdiff
CURLMOPT_TIMERFUNCTION.3: warn about the recursive risk [ci skip]
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 May 2019 13:44:49 +0000 (15:44 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 May 2019 21:21:07 +0000 (23:21 +0200)
Reported-by: Ricardo Gomes
Bug: #3537
Closes #3836

docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3

index d926d811d5aac839d1ca2e22712c4362fe97c801..344813fe841beff977a829c31c7dda52b6fed78c 100644 (file)
@@ -54,6 +54,11 @@ The \fBuserp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP.
 
 The timer callback should return 0 on success, and -1 on error. This callback
 can be used instead of, or in addition to, \fIcurl_multi_timeout(3)\fP.
+
+\fBWARNING:\fP even if it feels tempting, avoid calling libcurl directly from
+within the callback itself when the \fBtimeout_ms\fP value is zero, since it
+risks triggering an unpleasant recursive behavior that immediately calls
+another call to the callback with a zero timeout...
 .SH DEFAULT
 NULL
 .SH PROTOCOLS