From a3ace50a300af200fb0bda7bf1758b8e07d6cf86 Mon Sep 17 00:00:00 2001 From: an-tao <20741618@qq.com> Date: Tue, 24 Jul 2018 17:37:15 +0800 Subject: [PATCH] Debug HttpClient... --- lib/src/HttpClientImpl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/HttpClientImpl.cc b/lib/src/HttpClientImpl.cc index fd13d9e8..067a8844 100644 --- a/lib/src/HttpClientImpl.cc +++ b/lib/src/HttpClientImpl.cc @@ -65,7 +65,7 @@ void HttpClientImpl::sendRequestInLoop(const drogon::HttpRequestPtr &req, const { //send request; auto connPtr=_tcpClient->connection(); - if(connPtr->connected()) + if(connPtr&&connPtr->connected()) { if(_reqAndCallbacks.empty()) { @@ -124,4 +124,4 @@ void HttpClientImpl::onRecvMessage(const trantor::TcpConnectionPtr &connPtr,tran } context->reset(); } -} \ No newline at end of file +}