[3.0] 8306db9 Call SES_Delete on sessions found to be closed during vca_return_session.

Tollef Fog Heen tfheen at varnish-cache.org
Mon Apr 16 10:43:11 CEST 2012


commit 8306db9a95c7b3022fdeee038b1e6973f46382f9
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Mar 7 11:12:55 2012 +0100

    Call SES_Delete on sessions found to be closed during vca_return_session.

diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c
index 007fe6e..c513e1a 100644
--- a/bin/varnishd/cache_acceptor.c
+++ b/bin/varnishd/cache_acceptor.c
@@ -382,9 +382,10 @@ vca_return_session(struct sess *sp)
 	 * Set nonblocking in the worker-thread, before passing to the
 	 * acceptor thread, to reduce syscall density of the latter.
 	 */
-	if (VTCP_nonblocking(sp->fd))
+	if (VTCP_nonblocking(sp->fd)) {
 		vca_close_session(sp, "remote closed");
-	else if (vca_act->pass == NULL)
+		SES_Delete(sp);
+	} else if (vca_act->pass == NULL)
 		assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp));
 	else
 		vca_act->pass(sp);



More information about the varnish-commit mailing list