summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/timer.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-06 15:58:14 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-06 15:58:14 (GMT)
commit722d6b41053c6f143e10468d2ea25146a3dcf7a5 (patch)
tree1cd58dcc2f2a255d6cc388f45d4883b0757d262a /Utilities/cmlibuv/src/timer.c
parent21c5a311c60da34d4e66a1d1a778106110f9b5d2 (diff)
parent394b07af40e1bdbdca0033e53ca803585454da18 (diff)
downloadCMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.zip
CMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.tar.gz
CMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.tar.bz2
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv: libuv 2020-04-06 (d21f5aea)
Diffstat (limited to 'Utilities/cmlibuv/src/timer.c')
-rw-r--r--Utilities/cmlibuv/src/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/src/timer.c b/Utilities/cmlibuv/src/timer.c
index dd78bcb..9da513f 100644
--- a/Utilities/cmlibuv/src/timer.c
+++ b/Utilities/cmlibuv/src/timer.c
@@ -74,7 +74,7 @@ int uv_timer_start(uv_timer_t* handle,
uint64_t repeat) {
uint64_t clamped_timeout;
- if (cb == NULL)
+ if (uv__is_closing(handle) || cb == NULL)
return UV_EINVAL;
if (uv__is_active(handle))
@@ -87,7 +87,7 @@ int uv_timer_start(uv_timer_t* handle,
handle->timer_cb = cb;
handle->timeout = clamped_timeout;
handle->repeat = repeat;
- /* start_id is the second index to be compared in uv__timer_cmp() */
+ /* start_id is the second index to be compared in timer_less_than() */
handle->start_id = handle->loop->timer_counter++;
heap_insert(timer_heap(handle->loop),