]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix(c): guard select() from high number file descriptors
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 29 Oct 2022 10:27:10 +0000 (12:27 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 11 Dec 2022 20:04:31 +0000 (20:04 +0000)
commit291524c7f7d769fcb0f5cce2497e1d14e46465d9
tree602b1ec0ed58b213637816842f8324b3ca813217
parent159e43d98aac8e4ed0dc7aa90d33db75687ca18a
fix(c): guard select() from high number file descriptors

The Python `select.select()` wrapper raises ValueError. Without a guard,
the C `wait_select()` segfaults. The C way to say you have been naughty.

On Windows this seems not only not needed, but it actually stops from creating
any connection at all.
psycopg_c/psycopg_c/_psycopg/waiting.pyx
tests/test_waiting.py