diff options
author | Fedor Indutny <fedor@indutny.com> | 2016-06-03 13:02:43 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2016-06-03 13:02:43 -0400 |
commit | 1c8f4ad0972cdcac8f9c3a5408380f8fa19392f8 (patch) | |
tree | dcac2fa07f214cef8c8070c6440acadb5cba61c7 | |
parent | 01aa975708efb614c5a0dadcbe38f0a47c2f3343 (diff) | |
download | uv_link_t-1c8f4ad0972cdcac8f9c3a5408380f8fa19392f8.tar.gz |
src: fix the close depth tracking for read/alloc
-rw-r--r-- | src/uv_link_t.c | 12 |
1 files 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); } |