diff --git a/Libraries/LibCore/Socket.cpp b/Libraries/LibCore/Socket.cpp index e5d5411829..c8f07672f2 100644 --- a/Libraries/LibCore/Socket.cpp +++ b/Libraries/LibCore/Socket.cpp @@ -204,6 +204,8 @@ void Socket::ensure_read_notifier() ASSERT(m_connected); m_read_notifier = Notifier::construct(fd(), Notifier::Event::Read, this); m_read_notifier->on_ready_to_read = [this] { + if (!can_read()) + return; if (on_ready_to_read) on_ready_to_read(); };