Commit 936ecda1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Also accept deferred EBADF errors.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2269 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent faf1776b
......@@ -148,13 +148,17 @@ vca_kq_sess(struct sess *sp, short arm)
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;
}
......
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