From f847245f946a97addb5e4a0f692b88258e7de4be Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 21 Aug 2006 19:05:57 +0000 Subject: [PATCH] Add asserts. Return if we pass on directly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@876 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_acceptor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 9f191975..9051eca1 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -161,11 +161,15 @@ vca_return_session(struct sess *sp) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + assert(sp->obj == NULL); + assert(sp->vcl == NULL); if (sp->fd >= 0) { VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); - if (http_RecvPrepAgain(sp->http)) + if (http_RecvPrepAgain(sp->http)) { vca_handover(sp, 0); + return; + } } vca_acceptors[0]->recycle(sp); } -- 2.39.5