more timeout avoidance
This commit is contained in:
parent
4cc2763a04
commit
52aeb2f9b9
1 changed files with 4 additions and 2 deletions
|
|
@ -197,10 +197,12 @@ hparseheaders(HConnect *c, int timeout)
|
||||||
|
|
||||||
memset(&h, 0, sizeof(h));
|
memset(&h, 0, sizeof(h));
|
||||||
h.c = c;
|
h.c = c;
|
||||||
alarm(timeout);
|
if(timeout)
|
||||||
|
alarm(timeout);
|
||||||
if(hgethead(c, 1) < 0)
|
if(hgethead(c, 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
alarm(0);
|
if(timeout)
|
||||||
|
alarm(0);
|
||||||
h.hstart = c->hpos;
|
h.hstart = c->hpos;
|
||||||
|
|
||||||
if(setjmp(h.jmp) == -1)
|
if(setjmp(h.jmp) == -1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue