Send the cares error message before cleaning it

fix #3083
This commit is contained in:
Florent Le Coz
2015-07-09 14:35:29 +02:00
parent 4130f1679d
commit ac6a74595c
+2 -1
View File
@@ -109,8 +109,9 @@ void TCPSocketHandler::connect(const std::string& address, const std::string& po
addr_res = this->cares_addrinfo;
if (!addr_res)
{
const auto msg = this->cares_error;
this->close();
this->on_connection_failed(this->cares_error);
this->on_connection_failed(msg);
return ;
}
}