]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove ClientSocketContext::deRegisterWithConn()
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 12:47:04 +0000 (04:47 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 12:47:04 +0000 (04:47 -0800)
Merge with ClientSocketContext::connIsFinished(). Completing transactions
is the proper way to get requests de-queued.

src/client_side.cc
src/client_side.h

index f44f082c498fc9c7882e31168960f0cbef02e0ec..d29a12a93108785e52854047a048a579fec58786 100644 (file)
@@ -255,9 +255,6 @@ ClientSocketContext::~ClientSocketContext()
         }
     }
 
-    if (connRegistered_)
-        deRegisterWithConn();
-
     httpRequestFree(http);
 
     /* clean up connection links to us */
@@ -274,24 +271,19 @@ ClientSocketContext::registerWithConn()
     http->getConn()->pipeline.add(ClientSocketContext::Pointer(this));
 }
 
-void
-ClientSocketContext::deRegisterWithConn()
-{
-    assert (connRegistered_);
-    removeFromConnectionList(http->getConn());
-    connRegistered_ = false;
-}
-
 void
 ClientSocketContext::connIsFinished()
 {
     assert (http);
     assert (http->getConn() != NULL);
     ConnStateData *conn = http->getConn();
-    deRegisterWithConn();
+
     /* we can't handle any more stream data - detach */
     clientStreamDetach(getTail(), http);
 
+    assert(connRegistered_);
+    connRegistered_ = false;
+    removeFromConnectionList(conn);
     conn->kick(); // kick anything which was waiting for us to finish
 }
 
index 8aad6d367193f34fe72ee54f8c92b52099f34683..0989be2dd1c6110c90782a6278d37c0e9a77f22f 100644 (file)
@@ -138,7 +138,6 @@ private:
     void prepareReply(HttpReply * rep);
     void packChunk(const StoreIOBuffer &bodyData, MemBuf &mb);
     void packRange(StoreIOBuffer const &, MemBuf * mb);
-    void deRegisterWithConn();
     void doClose();
     void initiateClose(const char *reason);