From 18007a9e2fad1b3559ec065bca6bb854b91888d8 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 18 Feb 2008 17:04:30 +0000 Subject: [PATCH] Move the assertions around; it is apparently possible to get a null event on a session that no longer has the fd that the event was registered on. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2513 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_acceptor_kqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c index 11a8795d..2852fc16 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c @@ -219,14 +219,14 @@ vca_kev(const struct kevent *kp) VSL(SLT_Debug, sp->id, "sp %p kev data %lu flags 0x%x%s", sp, (unsigned long)kp->data, kp->flags, (kp->flags & EV_EOF) ? " EOF" : ""); - spassert(sp->id == kp->ident); - spassert(sp->fd == sp->id || sp->fd == -1); if (sp->fd == -1 || kp->fflags == 0) { if (params->diag_bitmap & 0x4) VSL(SLT_Debug, sp->id, "KQ: got event 0x%04x on fd %d", - kp->fflags, sp->fd); + kp->fflags, kp->ident); return; } + spassert(sp->id == kp->ident); + spassert(sp->fd == sp->id); if (kp->data > 0) { i = HTC_Rx(sp->htc); if (i == 0) -- 2.39.5