aboutsummaryrefslogtreecommitdiff
path: root/src/common/zstd_compression.cpp
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-11-03 00:17:34 +0100
committercirakg <cirakg@cirakg.xyz>2026-11-03 00:17:34 +0100
commit78e0a12180a71adf8dffc2c2f6697a0a0735d5ea (patch)
treeaa01f2f66b870d40780f957e97f7a071533e2b5a /src/common/zstd_compression.cpp
parentb233b36862d370d73fe517a1e53c34b50c2845f5 (diff)
network: fix room socket races and share the room network check
bsd:s, bsd:u and bsd:a share one file descriptor table, but each service bound its own proxy packet callback, so every room packet was queued three times on each socket. Bind the callback once. The room thread walked the descriptor table without a lock while bsd created and closed sockets, so it could reach a destroyed or not yet created socket. Guard the table with a mutex, and publish a socket only after it is created and initialized. Check airplane mode before an fd is taken, so a refused socket no longer leaks its slot. ProxySocket now initializes protocol, decompresses packets outside the packet lock without copying the compressed data first, and keeps a read offset for partial TCP reads instead of erasing from the front. Add Network::GetRoomIPv4Address(), set only in the Joined and Moderator states. NIFM uses it for network availability and for every reported address, including EnumerateNetworkInterfaces and GetCurrentIpAddress, so no call reports the room address while another rejects the network. Assisted-by: Claude Opus 5.5 (investigation and implementation)
Diffstat (limited to 'src/common/zstd_compression.cpp')
0 files changed, 0 insertions, 0 deletions