Handle EAGAIN and EINTR for freebsd sendfile (#1675)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2256 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.20
Stefan Bühler 15 years ago
parent 3f791f46d5
commit c1662bcf8a

@ -39,6 +39,7 @@ NEWS
* case insensitive match for secdownload md5 token (#1710)
* Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687)
* fixed mod_secdownload problem with unsigned time_t (#1688)
* handle EAGAIN and EINTR for freebsd sendfile (#1675)
- 1.4.19 - 2008-03-10

@ -166,6 +166,7 @@ int network_write_chunkqueue_freebsdsendfile(server *srv, connection *con, int f
if (-1 == sendfile(c->file.fd, fd, offset, toSend, NULL, &r, 0)) {
switch(errno) {
case EAGAIN:
case EINTR:
break;
case ENOTCONN:
return -2;
@ -175,7 +176,7 @@ int network_write_chunkqueue_freebsdsendfile(server *srv, connection *con, int f
}
}
if (r == 0) {
if (r == 0 && (errno != EAGAIN && errno != EINTR)) {
int oerrno = errno;
/* We got an event to write but we wrote nothing
*

Loading…
Cancel
Save