]> err.no Git - varnish/commitdiff
Use HTC_Rx() directly instead of vca_pollsession() wrapper
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 07:50:31 +0000 (07:50 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 07:50:31 +0000 (07:50 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2082 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor_kqueue.c

index 218c0f3d88698f0c6fe6d73b7be8c622296a21dc..b83aaa554e12aea296055dcac74997929982fde8 100644 (file)
@@ -98,14 +98,15 @@ vca_kev(const struct kevent *kp)
        }
        CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC);
        if (kp->data > 0) {
-               i = vca_pollsession(sp);
-               if (i == -1)
-                       return;
+               i = HTC_Rx(sp->htc);
+               if (i == 0)
+                       return; /* more needed */
                VTAILQ_REMOVE(&sesshead, sp, list);
-               if (i == 0) {
+               if (i > 0) {
                        vca_kq_sess(sp, EV_DELETE);
                        vca_handover(sp, i);
                } else {
+                       vca_close_session(sp, "err/poll");
                        SES_Delete(sp);
                }
                return;