mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:18:11 +00:00
LibCore: Always call on_connected whether the connection was synchronous or not
It's unreasonable to expect the client to have to call it themselves if the connection was immediate (local).
This commit is contained in:
parent
41d2c674d7
commit
14b2f90920
1 changed files with 5 additions and 2 deletions
|
@ -66,9 +66,12 @@ bool CSocket::connect(const CSocketAddress& address, int port)
|
|||
}
|
||||
perror("connect");
|
||||
exit(1);
|
||||
} else {
|
||||
dbg() << *this << " connected ok!";
|
||||
m_connected = true;
|
||||
if (on_connected)
|
||||
on_connected();
|
||||
}
|
||||
dbg() << *this << " connected ok!";
|
||||
m_connected = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue