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
This commit is contained in:
parent
2a4080a88b
commit
e485768d1e
|
@ -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…
Reference in New Issue