mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Kernel: Accepting sockets don't need to retain the client sockets.
This is all taken care of by the respective FileDescriptors. Before this patch, we were leaking every single socket, not great!
This commit is contained in:
parent
e48cbf3c8c
commit
6f966ca51d
3 changed files with 0 additions and 3 deletions
|
@ -27,7 +27,6 @@ private:
|
|||
virtual bool is_local() const override { return true; }
|
||||
|
||||
RetainPtr<FileDescriptor> m_file;
|
||||
RetainPtr<LocalSocket> m_peer;
|
||||
|
||||
bool m_bound { false };
|
||||
int m_accepted_fds_open { 0 };
|
||||
|
|
|
@ -49,7 +49,6 @@ RetainPtr<Socket> Socket::accept()
|
|||
auto client = m_pending.take_first();
|
||||
ASSERT(!client->is_connected());
|
||||
client->m_connected = true;
|
||||
m_clients.append(client.copy_ref());
|
||||
return client;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ private:
|
|||
timeval m_send_deadline { 0, 0 };
|
||||
|
||||
Vector<RetainPtr<Socket>> m_pending;
|
||||
Vector<RetainPtr<Socket>> m_clients;
|
||||
};
|
||||
|
||||
class SocketHandle {
|
||||
|
|
Loading…
Add table
Reference in a new issue