sys_net: fix possible event gap in recvfrom

This commit is contained in:
RipleyTom
2026-08-10 20:03:56 +03:00
committed by Elad
parent 7b6a8cc2d6
commit 2f4034590f
+3 -3
View File
@@ -798,7 +798,9 @@ error_code sys_net_bnet_recvfrom(ppu_thread& ppu, s32 s, vm::ptr<void> buf, u32
const auto sock = idm::check<lv2_socket>(s, [&, notify = lv2_obj::notify_all_t()](lv2_socket& sock)
{
const auto success = sock.recvfrom(flags, len);
auto lock = sock.lock();
const auto success = sock.recvfrom(flags, len, false);
if (success)
{
@@ -814,8 +816,6 @@ error_code sys_net_bnet_recvfrom(ppu_thread& ppu, s32 s, vm::ptr<void> buf, u32
return true;
}
auto lock = sock.lock();
sock.poll_queue(idm::get_unlocked<named_thread<ppu_thread>>(ppu.id), lv2_socket::poll_t::read, [&](bs_t<lv2_socket::poll_t> events) -> bool
{
if (events & lv2_socket::poll_t::read)