Call on_connection_failed() when the connection fails to be established
This commit is contained in:
1 parent
f7b75d7eb4
commit
58a2c00d44
1 file changed
+3
@@ -155,6 +155,9 @@ void SocketHandler::on_recv()
|
|||||||
else if (-1 == size)
|
else if (-1 == size)
|
||||||
{
|
{
|
||||||
log_warning("Error while reading from socket: " << strerror(errno));
|
log_warning("Error while reading from socket: " << strerror(errno));
|
||||||
|
if (this->connecting)
|
||||||
|
this->on_connection_failed(strerror(errno));
|
||||||
|
else
|
||||||
this->on_connection_close();
|
this->on_connection_close();
|
||||||
this->close();
|
this->close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user