diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-01 14:41:33 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-01 14:41:33 +0000 |
| commit | 12752bc0f9441ef9f929ee652eeb5d92b9dda4a5 (patch) | |
| tree | 8d37b2cd119078c9e1e84327211b213a6b4b0af6 /src/imgui/imgui_tables.cpp | |
| parent | 8e0d97f7957e570c2e26d79e66efe0cc064cee4b (diff) | |
pool: refuse a miner the select() loop cannot represent
The operator event loop still builds an fd_set by hand (#26), and FD_SET
on a descriptor the set cannot represent is undefined -- it writes past
the bitmap. MAX_POOL_MINERS caps the miner list at 1000, but that is a
count, and a count does not bound descriptor values: a Miner is removed
only on clean disconnect, so half-open sessions hold their fds while the
OS keeps issuing higher ones.
Refuse the connection instead, and refuse on the limit that actually
applies. On POSIX that is the descriptor value against FD_SETSIZE. On
Windows an fd_set is a counted array of SOCKET handles whose values are
arbitrary -- often large from the first accept -- so comparing a handle
against FD_SETSIZE there would reject nearly every miner; the bound is
how many sockets are held.
This is a behaviour change: a pool at the limit now turns miners away
with a log line rather than corrupting memory quietly. The real fix is
poll/epoll, which #26 tracks.
Diffstat (limited to 'src/imgui/imgui_tables.cpp')
0 files changed, 0 insertions, 0 deletions