From: Amos Jeffries Date: Sun, 15 Nov 2015 12:47:04 +0000 (-0800) Subject: Remove ClientSocketContext::deRegisterWithConn() X-Git-Tag: SQUID_4_0_3~5^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8ff036ef9f0d8a361359fbadf378b056b86bb73;p=thirdparty%2Fsquid.git Remove ClientSocketContext::deRegisterWithConn() Merge with ClientSocketContext::connIsFinished(). Completing transactions is the proper way to get requests de-queued. --- diff --git a/src/client_side.cc b/src/client_side.cc index f44f082c49..d29a12a931 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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 } diff --git a/src/client_side.h b/src/client_side.h index 8aad6d3671..0989be2dd1 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -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);