You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: shared/happy-eyeballs: a failed name lookup reports errno instead of the getaddrinfo error (error code 0 on Linux) #903
getaddrinfo reports failure through its return value (EAI_*), not errno. GetSockError() is errno on POSIX and WSAGetLastError() on Windows.
Class
Logic error: wrong error source.
How it is reached
happy_eyeballs_connect(ctx, "obs-rust-test.invalid", 80) on Linux returns STATUS_FAILURE, but happy_eyeballs_get_error_code(ctx) is 0 and the message is strerror(0) ("Success"). obs-outputs then logs a connect failure whose reason says success. Reproduced in the Tier 2 Linux container.
Proposed fix and failing test
Store err and use gai_strerror(err) (gai_strerrorA on Windows) for the message. Failing test: after an unresolvable lookup, happy_eyeballs_get_error_code is non-zero and the message is not "Success". test_happy_eyeballs (#880) deliberately leaves this unpinned until the fix.
Claiming: fix in one PR, RED (a new cmocka test: after an unresolvable lookup the error code is non-zero and the message is not "Success") then GREEN (store getaddrinfo's result; message from gai_strerror). Lands before the #880 move so the moved code carries the fix.
Activity
zackees commentedon Oct 15, 2026
Claiming: fix in one PR, RED (a new cmocka test: after an unresolvable lookup the error code is non-zero and the message is not "Success") then GREEN (store getaddrinfo's result; message from gai_strerror). Lands before the #880 move so the moved code carries the fix.
happy-eyeballs: Report the getaddrinfo error for a failed lookup (GREEN)
happy-eyeballs: Report the getaddrinfo error for a failed lookup (obs…
test: Characterize shared/happy-eyeballs before moving its platform code
test: Characterize shared/happy-eyeballs before moving its platform code
happy-eyeballs: Move platform code behind per-platform files (obs-rus…