about summary refs log tree commit diff stats
path: root/src/uv_link_t.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uv_link_t.c')
-rw-r--r--src/uv_link_t.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uv_link_t.c b/src/uv_link_t.c
index 64ca70d..f83a8a6 100644
--- a/src/uv_link_t.c
+++ b/src/uv_link_t.c
@@ -20,6 +20,10 @@ static void uv_link_def_read_cb(uv_link_t* link,
                                 const uv_buf_t* buf) {
   if (buf != NULL)
     free(buf->base);
+
+  /* Stop reading on error */
+  if (nread < 0)
+    uv_link_read_stop(link);
 }