oauth: Fix postcondition for set_timer on macOS
Thomas Munro <tmunro@postgresql.org>
oauth: Fix postcondition for set_timer on macOS On macOS, readding an EVFILT_TIMER to a kqueue does not appear to clear out previously queued timer events, so checks for timer expiration do not work correctly during token retrieval. Switching to IPv4-only communication exposes the problem, because libcurl is no longer clearing out other timeouts related to Happy Eyeballs dual-stack handling. Fully remove and re-register the kqueue timer events during each call to set_timer(), to clear out any stale expirations. Author: Jacob Champion <jacob.champion@enterprisedb.com> Discussion: https://postgr.es/m/CAOYmi%2Bn4EDOOUL27_OqYT2-F2rS6S%2B3mK-ppWb2Ec92UEoUbYA%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/libpq/fe-auth-oauth-curl.c | modified | +35 −13 |
Discussion
- [PoC] Federated Authn/z with OAUTHBEARER 429 messages · 2021-06-08 → 2025-08-08