]> err.no Git - varnish/commitdiff
Don't use vca_return_session() when we can SES_Delete()
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 15:34:32 +0000 (15:34 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 15:34:32 +0000 (15:34 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2093 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_pool.c

index bfb62e9a09e62db5a0f9f45e6d4d241a5e2746ba..501a5cf5dab42a023aa4abcc967c6c78092b07ee 100644 (file)
@@ -246,10 +246,8 @@ vca_return_session(struct sess *sp)
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        AZ(sp->obj);
        AZ(sp->vcl);
-       if (sp->fd < 0)
-               SES_Delete(sp);
-       else
-               assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp));
+       assert(sp->fd >= 0);
+       assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp));
 }
 
 
index 772ddc6c152a48029f29cfb82c8f61972cab1bec..645ed04a6a10390a3e3bacaa7d555f9a9514981d 100644 (file)
@@ -217,7 +217,7 @@ cnt_done(struct sess *sp)
                VSL_stats->sess_closed++;
                assert(!isnan(sp->wrk->used));
                sp->wrk = NULL;
-               vca_return_session(sp);
+               SES_Delete(sp);
                return (1);
        }
 
index 7302e84d68e3fd4c03c5d1096b502a36f27943b7..97388eec45de25420ebd38e24e69b59a059d2eda 100644 (file)
@@ -313,7 +313,7 @@ WRK_QueueSession(struct sess *sp)
                UNLOCK(&tmtx);
                sp->t_end = TIM_real();
                vca_close_session(sp, "dropped");
-               vca_return_session(sp);
+               SES_Delete(sp);
                return;
        }
        /*