fixed handling of EAGAIN in linux-sendfile (fixes #657)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2072 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Jan Kneschke 2008-02-10 18:49:39 +00:00
parent b719752a6c
commit 94feee046c
2 changed files with 3 additions and 3 deletions

1
NEWS
View File

@ -23,6 +23,7 @@ NEWS
* support chained proxies in mod_extforward (#1528)
* fixed bogus "cgi died ?" if we kill the CGI process on shutdown
* fixed ECONNRESET handling in network-openssl
* fixed handling of EAGAIN in network-linux-sendfile (#657)
- 1.4.18 - 2007-09-09

View File

@ -162,6 +162,7 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
switch (errno) {
case EAGAIN:
case EINTR:
/* ok, we can't send more, let's try later again */
r = 0;
break;
case EPIPE:
@ -172,9 +173,7 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
"sendfile failed:", strerror(errno), fd);
return -1;
}
}
if (r == 0) {
} else if (r == 0) {
int oerrno = errno;
/* We got an event to write but we wrote nothing
*