libfast: cancel thread if it fails to accept fcgi sessions
authorMartin Willi <martin@revosec.ch>
Wed, 20 Feb 2013 14:21:51 +0000 (15:21 +0100)
committerMartin Willi <martin@revosec.ch>
Thu, 18 Jul 2013 10:24:38 +0000 (12:24 +0200)
src/libfast/fast_dispatcher.c

index e0c57b4..4daf919 100644 (file)
@@ -152,6 +152,10 @@ static fast_session_t* load_session(private_fast_dispatcher_t *this)
                context = this->context_constructor(this->param);
        }
        session = fast_session_create(context);
+       if (!session)
+       {
+               return NULL;
+       }
 
        enumerator = this->controllers->create_enumerator(this->controllers);
        while (enumerator->enumerate(enumerator, &centry))
@@ -306,7 +310,7 @@ static void dispatch(private_fast_dispatcher_t *this)
 
                if (request == NULL)
                {
-                       continue;
+                       break;
                }
                now = time_monotonic(NULL);
                sid = request->get_cookie(request, "SID");