aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/ghiper.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/ghiper.c')
-rw-r--r--docs/examples/ghiper.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index fd643fc3a..cb013afd4 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -163,16 +163,14 @@ static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp)
MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n",
timeout_ms, timeout.tv_sec, timeout.tv_usec);
- /* TODO
- *
- * if timeout_ms is 0, call curl_multi_socket_action() at once!
- *
+ /*
* if timeout_ms is -1, just delete the timer
*
- * for all other values of timeout_ms, this should set or *update*
- * the timer to the new value
+ * For other values of timeout_ms, this should set or *update* the timer to
+ * the new value
*/
- g->timer_event = g_timeout_add(timeout_ms, timer_cb, g);
+ if(timeout_ms >= 0)
+ g->timer_event = g_timeout_add(timeout_ms, timer_cb, g);
return 0;
}