handle a sendfile() = 0 is connection closed by remote side

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@930 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent 2a4080a88b
commit e485768d1e
  1. 5
      src/network_linux_sendfile.c

@ -173,6 +173,11 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
return -1;
}
}
if (r == 0) {
/* we got a event to write put we couldn't. remote side closed ? */
return -2;
}
c->offset += r;
cq->bytes_out += r;

Loading…
Cancel
Save