LibCore: TCP and UDP servers should parent Notifiers to themselves

This makes things look a little more neat in Inspector. :^)
This commit is contained in:
Andreas Kling 2020-02-10 14:15:56 +01:00
parent aa149b9330
commit 3713d31750
Notes: sideshowbarker 2024-07-19 09:28:17 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ bool TCPServer::listen(const IPv4Address& address, u16 port)
ASSERT(rc == 0);
m_listening = true;
m_notifier = Notifier::construct(m_fd, Notifier::Event::Read);
m_notifier = Notifier::construct(m_fd, Notifier::Event::Read, this);
m_notifier->on_ready_to_read = [this] {
if (on_ready_to_accept)
on_ready_to_accept();

View file

@ -60,7 +60,7 @@ bool UdpServer::listen(const IPv4Address& address, u16 port)
ASSERT(rc == 0);
m_listening = true;
m_notifier = Notifier::construct(m_fd, Notifier::Event::Read);
m_notifier = Notifier::construct(m_fd, Notifier::Event::Read, this);
m_notifier->on_ready_to_read = [this] {
if (on_ready_to_accept)
on_ready_to_accept();