don't touch the alarm when there is no timeout

This commit is contained in:
rsc 2004-05-20 18:21:38 +00:00
parent f2479500fa
commit 4cc2763a04

View file

@ -40,9 +40,11 @@ hparsereq(HConnect *c, int timeout)
* later requests have to come quickly.
* only works for http/1.1 or later.
*/
if(timeout)
alarm(timeout);
if(hgethead(c, 0) < 0)
return -1;
if(timeout)
alarm(0);
c->reqtime = time(nil);
c->req.meth = getword(c);