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:
Andreas Kling 2019-03-20 02:46:36 +01:00
parent e48cbf3c8c
commit 6f966ca51d
3 changed files with 0 additions and 3 deletions

View file

@ -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 };

View file

@ -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;
}

View file

@ -74,7 +74,6 @@ private:
timeval m_send_deadline { 0, 0 };
Vector<RetainPtr<Socket>> m_pending;
Vector<RetainPtr<Socket>> m_clients;
};
class SocketHandle {