mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
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:
parent
aa149b9330
commit
3713d31750
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue