67 |
* REQUEST_TIMEOUT * 1000. |
* REQUEST_TIMEOUT * 1000. |
68 |
* -1 means forever |
* -1 means forever |
69 |
*/ |
*/ |
70 |
timeout = (params->request_ready ? 0 : |
SET_TIMEOUT( timeout, 1000, -1); |
|
(params->request_block ? |
|
|
(ka_timeout ? ka_timeout * 1000 : |
|
|
REQUEST_TIMEOUT * 1000) : -1)); |
|
71 |
|
|
72 |
if (poll(params->pfds, params->pfd_len, timeout) == -1) { |
if (poll(params->pfds, params->pfd_len, timeout) == -1) { |
73 |
if (errno == EINTR) |
if (errno == EINTR) |
100 |
if (params->server_s[1].socket != -1) process_requests(params, ¶ms->server_s[1]); |
if (params->server_s[1].socket != -1) process_requests(params, ¶ms->server_s[1]); |
101 |
#endif |
#endif |
102 |
} |
} |
103 |
|
|
104 |
|
return NULL; |
105 |
} |
} |
106 |
|
|
107 |
/* |
/* |
142 |
continue; |
continue; |
143 |
} else if (time_since > REQUEST_TIMEOUT) { |
} else if (time_since > REQUEST_TIMEOUT) { |
144 |
log_error_doc(current); |
log_error_doc(current); |
145 |
fputs("connection timed out\n", stderr); |
fprintf(stderr, "connection timed out (%d secs)\n", (int)time_since); |
146 |
current->status = DEAD; |
current->status = DEAD; |
147 |
ready_request( params, current); |
ready_request( params, current); |
148 |
continue; |
continue; |