From ac6a74595c679c22ae13eca0609a745e431b339c Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 9 Jul 2015 13:56:22 +0200 Subject: Send the cares error message before cleaning it fix #3083 --- louloulibs/network/tcp_socket_handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'louloulibs') diff --git a/louloulibs/network/tcp_socket_handler.cpp b/louloulibs/network/tcp_socket_handler.cpp index f647b86..e20357b 100644 --- a/louloulibs/network/tcp_socket_handler.cpp +++ b/louloulibs/network/tcp_socket_handler.cpp @@ -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 ; } } -- cgit v1.2.3