diff --git a/io/iob_send.c b/io/iob_send.c index 2f61377..0b89fd9 100644 --- a/io/iob_send.c +++ b/io/iob_send.c @@ -51,7 +51,7 @@ int64 iob_send(int64 s,io_batch* b) { } hdr.headers=v; hdr.hdr_cnt=headers; hdr.trailers=v+headers; hdr.trl_cnt=trailers; - r=sendfile(e[headers].fd,s,e[headers].off,nbytes,&hdr,&sbytes,0); + r=sendfile(e[headers].fd,s,e[headers].offset,e[headers].bytes,&hdr,&sbytes,0); if (r==0) sent=b->bytesleft; else if (r==-1 && errno==EAGAIN)