From ac18943b6eb9fb6747be983b09a485863a66bef5 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 21 Aug 2006 09:49:43 +0000 Subject: [PATCH] Don't hose TIMER kevent with READ kevent git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@860 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_acceptor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 625e41b3..e2a40c1f 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -398,7 +398,6 @@ vca_kq_sess(struct sess *sp, int arm) CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); memset(ke, 0, sizeof ke); - j = 0; if (arm == EV_ADD || arm == EV_ENABLE) { assert(sp->kqa == 0); sp->kqa = 1; @@ -408,9 +407,9 @@ vca_kq_sess(struct sess *sp, int arm) sp->kqa = 0; arm2 = EV_DELETE; } + j = 0; EV_SET(&ke[j++], sp->id, EVFILT_TIMER, arm2, 0, params->sess_timeout * 1000, sp); - j = 0; if (sp->fd >= 0) EV_SET(&ke[j++], sp->fd, EVFILT_READ, arm, 0, 0, sp); -- 2.39.5