diff --git a/src/Request.cpp b/src/Request.cpp index 927d8b9..1734c3c 100644 --- a/src/Request.cpp +++ b/src/Request.cpp @@ -103,6 +103,7 @@ Request::~Request() void Request::clear() { + mConn = nullptr; mRes = nullptr; mHead.clear(); mReq.clear(); @@ -293,6 +294,7 @@ void Request::follow(Request* leader) if (leader == this) { return; } + mConn = leader->mConn; mType = leader->mType; mHead = leader->mHead; mReq = leader->mReq; diff --git a/src/Request.h b/src/Request.h index 260e5be..1f04102 100644 --- a/src/Request.h +++ b/src/Request.h @@ -71,7 +71,7 @@ class Request : bool isDone() const; AcceptConnection* connection() const { - return mLeader ? mLeader->mConn : mConn; + return mConn; } void detach() {