Skip to content

Commit

Permalink
LibCore: TCP and UDP servers should parent Notifiers to themselves
Browse files Browse the repository at this point in the history
This makes things look a little more neat in Inspector. :^)
  • Loading branch information
awesomekling committed Feb 10, 2020
1 parent aa149b9 commit 3713d31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Libraries/LibCore/TCPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibCore/UdpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3713d31

Please sign in to comment.