From: des Date: Sat, 16 Feb 2008 11:03:37 +0000 (+0000) Subject: We may get spurious events on an unclosed fd as well. It won't cause X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc2ce77945f52aece23c248ae5ef69e00455ab6e;p=varnish We may get spurious events on an unclosed fd as well. It won't cause any harm, but I still want to catch it early so we get a log entry for it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2491 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c index 94c4ec7a..8156f62b 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c @@ -221,9 +221,9 @@ vca_kev(const struct kevent *kp) #endif spassert(sp->id == kp->ident); spassert(sp->fd == sp->id || sp->fd == -1); - if (sp->fd == -1) { - VSL(SLT_Debug, sp->id, "%s(): got event 0x%04x on closed fd", - __func__, kp->fflags); + if (sp->fd == -1 || kp->fflags == 0) { + VSL(SLT_Debug, sp->id, "%s(): got event 0x%04x on fd %d", + __func__, kp->fflags, sp->fd); return; } if (kp->data > 0) {