• Nils Goroll's avatar
    respect `send_timeout` for "dripping" http1 writes · 49e44e39
    Nils Goroll authored
    Previously, we only checked `v1l->deadline` (which gets initialized
    from the `send_timeout` session attribute or parameter) only for short
    writes, so for successful "dripping" http1 writes (streaming from a
    backend busy object with small chunks), we did not respect the
    timeout.
    
    This patch restructures `V1L_Flush()` to always check the deadline
    before a write by turning a `while() { ... }` into a `do { ... }
    while` with the same continuation criteria: `while (i != v1l->liov)`
    is turned into `if (i == v1l->liov) break;` and `while (i > 0 || errno
    == EWOULDBLOCK)` is kept to retry short writes.
    
    This also reduces the `writev()` call sites to one.
    
    Fixes #3189
    49e44e39
Name
Last commit
Last update
.circleci Loading commit data...
.github Loading commit data...
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
.dir-locals.el Loading commit data...
.envrc Loading commit data...
.gitignore Loading commit data...
.lgtm.yml Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...
vtc.am Loading commit data...