summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_http_client.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp
index 0c7ec509a..7e8e28b0b 100644
--- a/src/modules/m_http_client.cpp
+++ b/src/modules/m_http_client.cpp
@@ -61,10 +61,11 @@ class HTTPResolver : public Resolver
void OnLookupComplete(const string &result, unsigned int ttl, bool cached, int resultnum = 0)
{
+ ServerInstance->Log(DEBUG,"HTTPResolver::OnLookupComplete");
if (!resultnum)
socket->Connect(result);
else
- socket->Connect(orig);
+ socket->OnClose();
}
void OnError(ResolverError e, const string &errmsg)
@@ -251,11 +252,9 @@ void HTTPSocket::Connect(const string &ip)
{
Instance->Log(DEBUG,"HTTPSocket::Connect");
strlcpy(this->IP, ip.c_str(), MAXBUF);
-
+
if (!this->DoConnect())
- {
- delete this;
- }
+ this->Close();
}
bool HTTPSocket::OnConnected()