# HG changeset patch # User Matt Johnston # Date 1426865625 -28800 # Node ID 88043f9d40bda46b31db57145e887b07fdbfd291 # Parent 686cd3e8e13edef07eae7e4b7b17691f4fc65913 Fix when iov queue is large diff -r 686cd3e8e13e -r 88043f9d40bd netio.c --- a/netio.c Fri Mar 20 22:53:32 2015 +0800 +++ b/netio.c Fri Mar 20 23:33:45 2015 +0800 @@ -273,7 +273,7 @@ *iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count); - for (l = queue->head, i = 0; l; l = l->link, i++) + for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++) { writebuf = (buffer*)l->item; len = writebuf->len - 1 - writebuf->pos;