Kernel: Move NNRP<Socket>s instead of copying in queue_connection_from

This commit is contained in:
Idan Horowitz 2022-04-09 22:26:25 +03:00 committed by Andreas Kling
parent 4a270c93ed
commit 2c025d6334
Notes: sideshowbarker 2024-07-17 14:14:03 +09:00

View file

@ -69,7 +69,7 @@ ErrorOr<void> Socket::queue_connection_from(NonnullRefPtr<Socket> peer)
MutexLocker locker(mutex());
if (m_pending.size() >= m_backlog)
return set_so_error(ECONNREFUSED);
SOCKET_TRY(m_pending.try_append(peer));
SOCKET_TRY(m_pending.try_append(move(peer)));
evaluate_block_conditions();
return {};
}