Commit 39ffd5d3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Allow ENOENT on removing kqueue events, a close will have drained

them already.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@609 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4c3c4cad
......@@ -261,13 +261,18 @@ static void
vca_kq_sess(struct sess *sp, int arm)
{
struct kevent ke[2];
int i;
assert(arm == EV_ADD || arm == EV_DELETE);
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
memset(ke, 0, sizeof ke);
EV_SET(&ke[0], sp->fd, EVFILT_READ, arm, 0, 0, sp);
EV_SET(&ke[1], sp->fd, EVFILT_TIMER, arm , 0, 5000, sp);
AZ(kevent(kq, ke, 2, NULL, 0, NULL));
i = kevent(kq, ke, 2, NULL, 0, NULL);
if (arm == EV_ADD)
assert(i == 0);
else
assert(i == 0 || errno == ENOENT);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment