Hi,
Is there a way to delay a connection for some time?
I've done a clone of tarpit (with bindings and reqidelay), but it doesn't want to work
if (txn->flags & TX_CLDELAY) {
/* wipe the request out so that we can drop the
connection early
* if the client closes first.
*/
buffer_write_dis(req);
req->analysers |= AN_REQ_HTTP_DELAY;
req->analyse_exp = tick_add_ifset(now_ms,
s->be->timeout.delay);
if (!req->analyse_exp)
req->analyse_exp = tick_add(now_ms, 0);
}
int http_process_delay(struct session *s, struct buffer *req)
{
struct http_txn *txn = &s->txn;
if ((req->flags & (BF_SHUTR|BF_READ_ERROR)) == 0 &&
!tick_is_expired(req->analyse_exp, now_ms))
return 0;
if (req->flags != BF_READ_ERROR)
buffer_write_ena(req);
return 1;
BRG,
Andrew
Received on 2009/08/02 03:53
This archive was generated by hypermail 2.2.0 : 2009/08/02 04:00 CEST