From: phk Date: Mon, 21 Aug 2006 09:49:43 +0000 (+0000) Subject: Don't hose TIMER kevent with READ kevent X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac18943b6eb9fb6747be983b09a485863a66bef5;p=varnish 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 --- 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);