Call on_connection_failed() when the connection fails to be established
This commit is contained in:
1 parent
f7b75d7eb4
commit
58a2c00d44
1 file changed
+4
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user