r2269 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Nov 20 15:32:01 CET 2007
Author: phk
Date: 2007-11-20 15:32:01 +0100 (Tue, 20 Nov 2007)
New Revision: 2269
Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
Log:
Also accept deferred EBADF errors.
Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-11-20 14:20:36 UTC (rev 2268)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-11-20 14:32:01 UTC (rev 2269)
@@ -148,13 +148,17 @@
assert(i <= 0);
if (i < 0) {
/*
- * We do not push kevents into the kernel before passing the session off
- * to a worker thread, so by the time we get around to delete the event
- * the fd may be closed and we get an ENOENT back once we do flush.
- *
- * XXX: Can we get EBADF if the client closes during this window ?
+ * We do not push kevents into the kernel before
+ * passing the session off to a worker thread, so
+ * by the time we get around to delete the event
+ * the fd may be closed and we get an ENOENT back
+ * once we do flush.
+ * We can get EBADF the same way if the client closes
+ * on us. In that case, we get no kevent on that
+ * socket, but the TAILQ still has it, and it will
+ * be GC'ed there after the timeout.
*/
- assert(errno == ENOENT);
+ assert(errno == ENOENT || errno == EBADF);
}
nki = 0;
}
More information about the varnish-commit
mailing list