plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 52aeb2f9b9c67c777b683206afaa12050251a689
parent 4cc2763a045dcd208b2970334b86431aeacb2c02
Author: rsc <devnull@localhost>
Date:   Thu, 20 May 2004 18:22:53 +0000

more timeout avoidance

Diffstat:
Msrc/libhttpd/parse.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libhttpd/parse.c b/src/libhttpd/parse.c @@ -197,10 +197,12 @@ hparseheaders(HConnect *c, int timeout) memset(&h, 0, sizeof(h)); h.c = c; - alarm(timeout); + if(timeout) + alarm(timeout); if(hgethead(c, 1) < 0) return -1; - alarm(0); + if(timeout) + alarm(0); h.hstart = c->hpos; if(setjmp(h.jmp) == -1)