Browse Source

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
svn/tags/lighttpd-1.4.19
Jan Kneschke 14 years ago
parent
commit
94feee046c
  1. 1
      NEWS
  2. 5
      src/network_linux_sendfile.c

1
NEWS

@ -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

5
src/network_linux_sendfile.c

@ -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
*

Loading…
Cancel
Save