From 1c8f4ad0972cdcac8f9c3a5408380f8fa19392f8 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 3 Jun 2016 13:02:43 -0400 Subject: src: fix the close depth tracking for read/alloc --- src/uv_link_t.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/uv_link_t.c b/src/uv_link_t.c index 3ee91b9..9058b55 100644 --- a/src/uv_link_t.c +++ b/src/uv_link_t.c @@ -190,10 +190,10 @@ void uv_link_propagate_alloc_cb(uv_link_t* link, if (link->child != NULL) target = link->child; - link->close_depth++; + target->close_depth++; link->alloc_cb(target, suggested_size, buf); - if (--link->close_depth == 0) - uv_link_maybe_close(link); + if (--target->close_depth == 0) + uv_link_maybe_close(target); } @@ -206,8 +206,8 @@ void uv_link_propagate_read_cb(uv_link_t* link, if (link->child != NULL) target = link->child; - link->close_depth++; + target->close_depth++; link->read_cb(target, nread, buf); - if (--link->close_depth == 0) - uv_link_maybe_close(link); + if (--target->close_depth == 0) + uv_link_maybe_close(target); } -- cgit