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
Notes:
sideshowbarker
2024-07-19 13:14:57 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/14b2f909202 Pull-request: https://github.com/SerenityOS/serenity/pull/314 Reviewed-by: https://github.com/awesomekling ✅
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
Reference in a new issue