mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
Avoid holding the sockets_by_tuple lock while allocating the TCPSocket. While checking if the list contains the item we can also hold the lock in shared mode, as we are only reading the hash table. In addition the call to from_tuple appears to be superfluous, as we created the socket, so we should be able to just return it directly. This avoids the recursive lock acquisition, as well as the unnecessary hash table lookups.
17 KiB
17 KiB