don't touch the alarm when there is no timeout
This commit is contained in:
parent
f2479500fa
commit
4cc2763a04
1 changed files with 4 additions and 2 deletions
|
|
@ -40,10 +40,12 @@ hparsereq(HConnect *c, int timeout)
|
||||||
* later requests have to come quickly.
|
* later requests have to come quickly.
|
||||||
* only works for http/1.1 or later.
|
* only works for http/1.1 or later.
|
||||||
*/
|
*/
|
||||||
alarm(timeout);
|
if(timeout)
|
||||||
|
alarm(timeout);
|
||||||
if(hgethead(c, 0) < 0)
|
if(hgethead(c, 0) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
alarm(0);
|
if(timeout)
|
||||||
|
alarm(0);
|
||||||
c->reqtime = time(nil);
|
c->reqtime = time(nil);
|
||||||
c->req.meth = getword(c);
|
c->req.meth = getword(c);
|
||||||
if(c->req.meth == nil){
|
if(c->req.meth == nil){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue