diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-20 02:54:52 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-20 02:54:52 +0200 |
commit | 85d2e8591236e534f572782cc875e2c5821b28e4 (patch) | |
tree | 9c4016a779f080041c500eefece697916dcd830b /Kernel/Net/LocalSocket.h | |
parent | 612e1c7023e6b828e9d3d2746cd885e92d4f3f04 (diff) | |
download | serenity-85d2e8591236e534f572782cc875e2c5821b28e4.zip |
LocalSocket: Fix mismatch between can_write() and write() logic.
can_write() was saying yes in situations where write() would overflow the
internal buffer. This patch adds a has_attached_peer() helper to make it
easier to understand what's going on in these functions.
Diffstat (limited to 'Kernel/Net/LocalSocket.h')
-rw-r--r-- | Kernel/Net/LocalSocket.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index b8c41c1ea7..81b902a982 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -25,6 +25,7 @@ public: private: explicit LocalSocket(int type); virtual bool is_local() const override { return true; } + bool has_attached_peer(const FileDescriptor&) const; RetainPtr<FileDescriptor> m_file; |