memcache/server.c
changeset 43 e5b714190dee
parent 42 0e503189af2f
child 46 8a832c0e01ee
--- a/memcache/server.c	Wed Aug 27 22:42:27 2008 +0300
+++ b/memcache/server.c	Thu Aug 28 00:29:39 2008 +0300
@@ -67,7 +67,10 @@
 
     if (conn != NULL) {
         // we found an available connection
-        return memcache_conn_do_req(conn, req);
+        // if the request fails, then we will know via conn_dead
+        memcache_conn_do_req(conn, req);
+
+        return 0;
 
     } else {
         // enqueue the request until a connection is available
@@ -92,12 +95,8 @@
         // remove it from the queue and execute it
         TAILQ_REMOVE(&server->req_queue, req, reqqueue_node);
         
-        if (memcache_conn_do_req(conn, req)) {
-            WARNING("processing enqueued request failed");
-            
-            // notify the request/user, the req is now out of our hands
-            memcache_req_error(req);
-        }
+        // this will take care of any error handling by itself
+        memcache_conn_do_req(conn, req);
     }
 }