Commit 58a2c00d authored by louiz’'s avatar louiz’

Call on_connection_failed() when the connection fails to be established

parent f7b75d7e
......@@ -155,7 +155,10 @@ void SocketHandler::on_recv()
else if (-1 == size)
{
log_warning("Error while reading from socket: " << strerror(errno));
this->on_connection_close();
if (this->connecting)
this->on_connection_failed(strerror(errno));
else
this->on_connection_close();
this->close();
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment